cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member

Problem

You want to create a Pareto Chart in Sisense from a collection of numbers that represent frequencies (or counts) of events or outcomes that fall into different categories.

Alt text

Solution

  • R script (Copy paste to Sisense Formula)

counts<-c(do.call('cbind',args));
t<-data.frame(counts);
id<-as.numeric(rownames(t));
t<-cbind(id=id,t);
t<-t[order(t$counts, decreasing=T),];
total <- sum(t$counts);
cumulative_precentage <- function(c){return(c/total)};
sisense_result <- sapply(t$counts, cumulative_precentage);
t<-cbind(t,sisense_result);
t$sisense_result<-cumsum(t$sisense_result);
t<-t[order(t$id),];
t$sisense_result

Alt text

Discussion

A Pareto Chart is a sorted bar chart that displays the frequency (or count) of occurrences that fall into various categories, from greatest frequency on the left to least frequency on the right, with an overlaid line chart that plots the cumulative percentage of occurrences. The vertical axis on the left of the chart shows frequency (or count), and the vertical axis on the right of the chart shows the cumulative percentage.

A ParetoChart is typically used to visualize:

  • Primary types or sources of defects.

  • Most frequent reasons for customer complaints.

  • The amount of some variable (e.g. money, energy usage, time) that can be attributed to or classified according to a particular category.

The Pareto Chart is typically used to separate the “vital few” from the “trivial many” using the Pareto principle, also called the 80/20 Rule, which asserts that approximately 80% of effects come from 20% of causes for many systems. Pareto analysis can thus be used to find, for example, the most critical types or sources of defects, the most common complaints that customers have, or an essential categories within which to focus problem-solving efforts.

Rate this article:
Version history
Last update:
‎03-02-2023 08:45 AM
Updated by:
Contributors