Pareto Principle ( also known as  80% of the effects come from 20% of the causes). To test whether superstore sales follow Pareto’s law we need to check if 80% of the profit come from 20% of the customers.  In Tableau, we can do this visually by creating a Pareto chart.  Let’s see how this looks using global superstore data

Step 1 – connect to the Superstore sample.
Step 2  Add customer name to the columns and profit to the rows shelves. Sort the dimension by total sum of profit, in descending order

 

 

Step 3– Change the chart view to “entire view”. By defaults Tableau showing bar chat, but it looks like a curve squashing everything into view.

Step 4 – Add a table calculation to your measure pill(profit). The table calculation should be configured as per the image below.
  •          Calculation type:                Running Total’
  •    Summarize values using:        ‘Sum’
  •                    Running along:       ‘Customer Name’ (dimension)
  •         Select ‘Add secondary calculation’
  •                 Secondary Type:      ‘Percent of Total’
  •                   Compute using:       Specific Dimensions ‘Customer Name’ (or your dimension)

 

 

 

Now we have the customer names on the x axis and the running total of the percentage of profit on the y axis. If you hover over the chart the tooltips will show which customer is at which percentage.

 

Step 5 – Duplicate your sorted dimension pill and place it on the ‘detail shelf’ on the marks card. You can do this by clicking on the customer name, holding control key down and dragging the ‘duplicated pill’ to the Detail shelf.

 

Step 6: Next right click customer name on the column shelf and change to count distinct. This will show a single bar.

Step 7-

Now we need to add a nested table calculation to get the curve back. Click count distinct(Customer name) and add table calculation. The table calculation should be configured as per the image below.

  • Calculation type:                 ‘Running Total’
  • Summarize values using:    ‘Sum’
  • Running along:                 ‘Customer Name’ (or your dimension)
  • Select ‘Add secondary calculation’
  • Secondary Type:                 ‘Percent of Total’
  • Compute using:                   Specific Dimensions ‘Customer Name’ (or your dimension)

 

Now change the mark type to “bar” in the mark shelf

Step 8:

After that drag the measure from rows shelf to colour in the mark shelf

Step 9:

In case you want to make it clearer, you can duplicate the measure pill (customer name) form the columns shelf and drag it to the colour ‘shelf’ and then set colour to diverging colour.

 

Step 10:

The Pareto chart is now complete. By adding the reference lines you can assist the user in how to read the chart. On the ‘Analytics Pane’ drag a reference line onto both axis. Set the reference line on the x axis to constant 0.2 (20%), and the reference line on the y axis to constant 0.8 (80%) as shown in the below screenshot.

When the two reference lines cross, that means 80% of the profit come from 20% of the customers

The Data School
Author: The Data School