“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

This week’s #workoutwednesday was about creating radial chart with lines equally spaced on the percent of the year completed.

Requirements

  • Use sales for 2017.
  • The size of the dashboard 500px x 600px.
  • If you think of the segments as a clock, Week 1 should be at the 12:00 position.
  • The weeks should be evenly spaced based on the week number.
  • You’ll be using geometry. The minimum radius is 1. The maximum radius is 2.3. (Spoilers provide some math help.)
  • The space between the segments is .15.
  • Note the tooltips to get some assistance on your math.

Here is my radial chart using LOD functions and bit of trigonometry functions to generate chart:

Thanks 🙂

Do subscribe to blog for keep receiving updates

#Makeovermonday partnered with Equal Measures 2030 for week 10 as we approach International Women’s day. This week we will be seeing how good or bad policymakers for 5 different countries are and how much awareness they have with women welfare in the country.

Here is the original dashboard:

I started with playing around with the survey data and create dashboard in simplified way to understand the responses and how well policymakers know the state of women in their respective countries. The requirement and data was share on http://www.makeovermonday.co.uk/data/ for week 10.

Below is my dashboard for #makeovermonday:

Thanks!!
Do subscribe to keep receiving regular updates

In today’s blog, we will learn about Bump Chart in Tableau. A Bump chart is used to visualize changes in rank over a period of time. Bump chart have very simple use and application in Tableau:

For this chart, I have used the world economic freedom data shared for #makeovermonday on http://www.makeovermonday.co.uk/data/ for last week makeover.

Step 1: Import the world economic freedom data into Tableau which I transformed into following format:

Step 2: Create a calculated field called rank on the score field using rank() function of Tableau:

Step 3: Drag Year (convert the Year to date format) to column shelf (I filtered the year from 2006 to 2015) and convert Year into discrete form and drag rank twice into rows. Then drag Index type column into filter and filter for “overall” Type and drag countries column into colors under marktype.

Step 4: For both the rank, change the calculation type by clicking on compute by and selecting countries and change the graph type to dual axis and use synchronise axis to have axis in sync

Step 5: Reverse the axis using edit axis option and change the graph type from automatic to circle for second Rank column:

Step 6: I set the filter for countries as well to display top 10 ranks and few changes in formatting then it will look like below:

That’s it our bump chart is ready

Final output is shared on Tableau public path here

Do subscribe on blog to keep receiving updates.

Thanks 🙂