We will start with a simple dimension (product name ) in Column and measures (sales) in rows, in order for the chart to make sense, there should be a lot of products:
Now in our particular example, we are comparing the running total and percent of total of the sales per product. So we create table calculation on sales. In this case, percent of total is the secondary type calculation after running total:
The graph changes afterwards to the following:
Now in this example, we are trying to compare the running sum of sales and total sum of sales, if when Total Sum/running is greater than 0.8, we should recognize those product item as above 80% of all. So in this case we will create a new calculated item called In Top 80% with the following formula: RUNNING_SUM(SUM([Sales])) / TOTAL(SUM([Sales]))<= 0.8
Unlike writing in SQL where we may have to put it in a case statement, here in Tableau since the condition is expecting a binary output: yes or no, and nothing else, the above formula is a simpler way to do so. It will divide the entire set with either > 0.8 or <=0.8
Now move it over to color box under marks, this will automatically divide the entire product list into 2 colored groups based on whether the divided value is greater than or less than 0.8
like so:
Now change the fitting from normal to entire view in order to see the big picture:
Entire picture:
Now lets add a reference line in the graph by right clicking on the vertical Axis, and we set the line value at 0.8 and make it constant.
This will drop a line at the graph at around 80% area on the graph and it will stay constant:
Now, let's sort the graph by product in ascending order by sales:
Now the Pareto chart is done:
Thanks
Until next time
1 comments:
Best online slots of 2020 | LuckyClub.live
Online Casino Reviews: Best Online Slots - Best Online Casino Slots of 2021: Rival Play ✓ Play for Real Money · BetUS Slots Review luckyclub.live · Top Play for Free
Post a Comment