Off the Charts Consulting
  • What we do
  • Who We Are
  • Blog
  • Contact

Can you build a dashboard with only Pie Charts?

9/14/2017

0 Comments

 


One of my customers said to me the other day "You data scientists are all the same, you hate Pie Charts". And we do. Rightfully so. They are an executive's favorite terrible method to display data. "I want to see sales by province in a pie chart" ... but that's 10 values (and 13 if you want territories - which the BA was vague about) it will be barely legible. Oh well. You're told to make it happen anyway.

But this generalization of a data scientists hate for Pie Charts. It caught me off guard. It got me thinking. Could you make an executive dashboard with only pie charts. The ultimate corner office dashboard.

Could you? Yes.
Should you? If you really have to ask, then get out. 

Feel free to find me on twitter and let me know your favorite Pie Chart use! @OffTheChartsC
The Data
I built out a totally fictitious pie franchise based in Central/Western Canada. The dataset is an aggregation of sales and profits for the last 12 months. My Pie franchise keeps things simple. We sell the five best flavours of Pie: Cherry, Lemon (meringue), Pumpkin, Blueberry and Apple. Sales are sporadic (almost totally random, oddly) across the provinces, months and types. There's also Target sales that are tracked provincially and by flavour, so that the VP can hammer on someone if sales trail off. 

View 1 - Executive Summary. 
First thing we need is an overall view of which type of Pie is meeting it's Target. And by how much. To do this I made two calculated fields. One was Target minus Sales for when Sales were less Target. The other was Target minus Sales for when Sales were greater than Target. Basically creating separate fields for above and below target. Then I added target itself, put measure values on as the pie slice, and measure names as the colour. Due to the separate fields for below and above only one or the other would show, along with Target. The last little thing was ordering the measures correctly so that "Above" would trend to the right and "Below" to the left. The final result: 
Picture

View 2 - Margin
My second view of Margin, and this is similar to above in some ways. Now we don't calculate margin in our super advanced Pie sales DB, so I had to do the traditional calc in Tableau (Sum Sales - Sum Profit/ Sum Sales) and then a second calc field that was simple 1 - margin. Combined they obviously make 100%. Do the same as above: measure values as the slice, names as the colour and use only the margin and 1-margin fields. One hangup I ran into here, which I am sure is surmountable with some effort, is getting the margin values to appear as text without the 1-margin values appearing. Like I said, I think you can get by that but I just ... didn't. 

View 3 - By Province
Now I need to know which of my regional managers is coming up short so I have someone to throw under the bus. And everyone loves a map. Our data set has a province dimension. We'll create a Filled map and add province to the detail and sales to the colour. But how to tell which type of pie is doing the best? I bet you can guess. Get a dual axis going by dragging a second latitude onto your rows. Then change the graph type to Pie chart, add sales to the slice, and type to the colour.
​
Picture
View 4 - Monthly Trend
Last thing we need to see is how our pies are trending month to month. Add your months to the columns. We need to do a fixed month sum of sales on the row. In the drop down, again - for the last time - select Pie. Add Type to the measure. Now a quick trick is we need to do a level of detail in order to keep our pie types in a pie, rather than adjusting to their respective sales. So I did a fixed calculation on Type and Month returning sum of sales. I then took that and added it to my angle. Just for a bit of another layer, I did a dual axis here as well. I did Sales as the second axis and clicked dual, sync, hide etc. I made it a bar chart and, while I'm sure this graph type already exists, I'm going to coin it a swirly-pop chart.

Add some filters, you'll need to make them specific to what you're filtering on (by going to dashboard -> Action instead of use as filter) and voila! A totally Pie chart for Pie sales reporting. Delicious. Click Here for the tableau public workbook. 


Picture
Picture
Picture
0 Comments



Leave a Reply.

  • What we do
  • Who We Are
  • Blog
  • Contact