top of page
Search
  • Writer's pictureYuchen Liu

4 Steps You Must Know for Creating Pareto Chart in Tableau

Updated: May 4, 2020

I believe most people have had this experience: being asked to join in the loyalty program of brands or department stores. Why are they doing this?


Companies value loyal customers because they bring most of the total profit. Italian economist Vilfredo Pareto noted a principle that roughly 80% of the effects come from 20% of the causes, which is also known as 80/20 rule. Although the rule does not apply to all scenarios, analysts use Pareto analysis to show which cause should be addressed first.


To highlight the most important factors that cause a significant result, Pareto chart was born. The graph shows how a simple Pareto chart looks like. It's beautiful, isn't it? This example of a Pareto chart is showing the high-value customers for profit generation.


Now let's see how we can create a new Pareto chart in Tableau and test how closely the data follows Pareto’s 80/20 rule.


Let's get started!


Exploring the data set:

I'm using the 'Global Superstore' (Source from Tableau E-learning) as an example. The data set is pretty clean and straightforward, which records the sales performance of customers from different markets globally on specific dates along with other details (ship mode, product info, etc.).


🤪Yuchen's Tip: New to Tableau? No worries, watching videos here to learn some basic knowledge!


Step 1 - Create Bar Chart by Adding Customer ID and Sum of Profit to the Columns and Rows

Sort Customer ID by sales descending and make the view 'Fit Width'. Then you'll see the top customers made the most profit. In the tail of the bar chart, some customers are not profitable which causes negative profit.

Step 2 - Drag Customer ID to Detail


This is a very important step because we want to create a table calculation using a specific dimension (Customer ID). You would do this step in 2 ways: dragging 'Customer ID' from 'Dimensions' pane or hold 'Command' while dragging 'Customer ID' from 'Columns' shelf to 'Detail' in 'Marks' card.


⚠️Customer ID should be sorted by profit in decreasing order in the 'Marks' card because we need to make sure that the Pareto chart can reflect the most important causes in the first place of X-axis.

Step 3 - Create Table Calculation for Profit and Count of Customer ID


To see the shape of the Pareto chart, we need two table calculations separately for 'Profit' and 'Customer ID'. First right click SUM(Profit) and add table calculation, we're going to chose 'Running Total' for the primary calculation type and compute using 'Customer ID' as a specific dimension. Then add secondary calculation and select 'Percent of Total' by 'Customer ID'.


You'll see Tableau automatically computing using Table(across), which is basically the same thing as we're using the 'Customer ID'.


Repeat this step for 'Customer ID', because we want to use the cumulative percentage of 'Customer ID' on the X-axis. We need one more step to do BEFORE the table calculation which is to set the measure of 'Customer ID' as 'Count Distinct [CNTD(Customer ID)]'.


You'll see the shape is broken, no worries, go ahead to add Table Calculation for the distinct count of 'Customer ID'. Now you need to make sure to compute using 'Customer ID' as a specific dimension.


Pareto chart is bar char, so we'll select 'Bar' from 'Marks' card and drag 'Profit' to 'Color'.


Step 4 - Add Constant Line to Show 80/20 Rule


To better show the 80/20 rule to the audience, we need two constant lines. Click 'Analytics' tab and drag 'Constant Line' to X/Y axis, and set the value to 0.2 and 0.8.

The chart shows that roughly 20% of the customer brings 80% of the profit in this case which follows the Pareto law.


🤪Yuchen's Tip: Check this great article to explore the background and mathematical theory if you want to dig more.


Happy Analyzing with Yuchen!

30 views0 comments

Recent Posts

See All

Why I Love Tableau Software

I've been working as a business analyst for almost two years and created hundreds of dashboard with Tableau, I have to say this software...

Commentaires


bottom of page