Pareto Chart in Tableau

“A Pareto chart, named after Vilfredo Pareto, is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line.” – Wikipedia

General assumption in Pareto chart is that 80% of the output is generated by 20% of input. This ratio is not accurate for all cases but it is very much accurate for most.

Lets try making one using #makeovermonday data on http://www.makeovermonday.co.uk/data/ for week 8 i.e. where does your medicine come from?

Step 1: Import the excel file into Tableau, Filter the data with year = 2016 and put a filter to have all countries expect world for exporter field. Then, drag the Exporter field to columns shelf and exports (USD) into rows shelf in worksheet and sort the exporter field in descending order by Exports (USD)

Step 2: Click on sum of Exports (USD) and select quick table calculation –> running total to calculate the running total of the values

Now our Pareto chart is ready but still we haven’t figure out the 80:20 ratios on output to input:

Step 3: Now we have to change the Exports(USD) axis from running total to percentage of total. To do this, please right click on the Exports(USD) on row shelf and select edit table calculation option as shown below:

 

Step 4: Once edit table calculation opens, please perform following:

  • Change compute using from Table across to Specific Dimensions –> select Exporter field
  • Select the Add Secondary calculation option given and select the secondary calculation type as Percent of Total
  • Also, change the compute using from Table across to Specific Dimensions –> Exporter Field

 

Now in below image we can Sweden is in top 12 but Exports(USD) is already at 82%

Step 5: Right click on Y-axis and Add a reference line then set Line value at 0.8 (i.e. 80%)

Step 6: Now create a calculated field to get Exporters percentage using Index() and Size() function:

Step 7: Drag the new calculated field to column shelf and drag exporters column to details under Marks then select the chart type as Line graph and also change the axis format to % as shown below

Step 8: Add a reference line on X-Axis and set Line Value at 0.2 (i.e. 20%) as shown below

From below screenshot, we have successfully create Pareto chart in Tableau:

Tableau workbook can be downloaded from here

Thank you visiting my blog 🙂

Do subscribe to keep receiving updates and new learnings