Donut charts are an alternative to pie charts, which allows for better use of screen space. I would not recommend using donut charts for more than three categories. In this case, we will use it to look at the rate of opportunities closed. To create a donut chart, the steps are as follows:
- Drag your Dimension (in this case, Closed) to the Color mark, as shown in Figure 5.1:
Figure 5.1: Dragging Closed field to Color mark to create donut chart
- From the Marks menu, choose Pie, as shown in Figure 5.2:
Figure 5.2: Changing marks type to Pie to create donut chart
- Take your measure (in this case a count distinct of Opportunity ID) and drag it to the Angle mark, as shown in Figure 5.3:
Figure 5.3: Dragging Opportunity ID count to Angle mark for donut chart
- Your data should now look like a pie chart, as shown in Figure 5.4:
Figure 5.4: Initial donut chart created
- To create a donut chart we need to ‘trick’ Tableau into thinking there are two pie charts. To do so, in the Rows space, type the following, as shown in Figure 5.5:
AVG(0)
Figure 5.5: Adding AVG(0) calculation to rows shelf to create stacked pies
- Then, repeat the same step again, as shown in Figure 5.6:
Figure 5.6: Adding second AVG(0) calculation to rows shelf
- You should now have two pie charts vertically stacked, as shown in Figure 5.7:
Figure 5.7: Vertically stacked pie charts created
8. Click on the caret that appears when hovering on either of the measures you have just created. A menu will, now, open, as shown in Figure 5.8:
Figure 5.8: Hovering over measure pill to access menu
- Click on the Dual Axis, as shown in Figure 5.9:
Figure 5.9: Selecting Dual Axis option
- Your pie charts are now on top of each other, so that it looks like you only have one pie chart. You also have 3 Marks menus now; one for each measure and one that controls both, as shown in Figure 5.10:
Figure 5.10: Stacked pie charts now overlapping as one chart
- Open one of the measure menus and remove all pills by dragging them away from the menu, as shown in Figure 5.11:
Figure 5.11: Removing pills from secondary measure
- From the same menu, click on the Color mark and select the color which matches your background (in this case white), as shown in Figure 5.12:
Figure 5.12: Changing secondary measure’s color to match background
- Still in the same menu, click on the Size mark and drag the indicator left to reduce the size of your chart, as shown in Figure 5.13:
Figure 5.13: Reducing secondary measure’s size
- Your chart should now start to look like a donut chart, as shown in Figure 5.14:
Figure 5.14: Donut chart taking shape