I was finally able to find a good use for pie charts in Tableau! Key performance indicators (KPIs) are a constant source of fascination for most business leaders, and this little viz trick gives them what they want. I whipped up an example using baseball pitching speed data. You can download my full workbook here.
1. First, create a calculated field called “Speed Goal” so you’ve got something to compare your metrics to.
2. Drag Measure Values to the Marks shelf. Filter the measure names to only include AVG(Speed) and AVG(Speed Goal). Drag Measure Names on color to add it to the Marks shelf and choose the pie graph viz type.
3. Once you’ve got the pie graph, drag Measure Values to the Angle. Clear anything you may have on your Rows shelf and add AVG(Number of Records) twice.
The colors: Choose whatever you would like for the first axis. I find light grey works well for the Speed Target.
Right click the bottom pie graph and set to a Duel Axis.
4. It is also important to synchronize the two axis, otherwise our little trick won’t work.
Your viz should look something like this. Basically you’ve got two pie graphs stacked on top of each other.
And here’s the trick, On the second axis, set both values to white. If Tableau only lets you do sequential color, use Custom Sequential set to white, > Advanced Start=0, End=0.Then resize the second axis (which should be white) to reveal the donut affect!
On your second axis, replace Measure Names with AVG(End Speed) for the graph angle.
Also on the second axis, drag AVG(End Speed) to Label and format the text.
Drag Pitch Type to your Columns shelf. Looking pretty good but notice you’ve still got those annoying zero lines and axis labels.
Right click the axis and get rid of the axis labels. To get rid of the zero lines, right click on the area, select “format” and set the zero lines to “None.”