How to create a donut chart in Tableau

Today, in this blog I will take you through the steps on how to build a donut chart in Tableau. A donut chart is similar to a pie chart but it has a central area empty giving a feel of two concentric circles or rings.

This chart is best used to represent:

  1. % split between different values within a dimension/KPI
  2. % achieved with respect to total.

Without any further delay, let’s start building our donut chart in Tableau. For this example, we will be referring to the Sample Superstore dataset which comes in handy, and build a donut chart that represents the percentage split of quantity among various categories.

Step 1:

First, in the marks card, change the mark type to pie type because we will first try and make a simple pie chart. Now, drag the Category from the data pane to the Colors and Quantity to Angle respectively. Use SUM() as an aggregation for Quantity.

Here in the image a Simple pie chart is shown divided by each Quantity of each categories

As we can see, we have a pie chart and the angles in the pie chart represent the distribution of quantity among the categories.  Now if we look carefully, a doughnut chart can be created using this pie chart if we remove the smaller middle section from this.

Step 2:

For proceeding, we will create a Calculated field which can be named as ‘number of records’ and in the formula, we will just write ‘1’ 

The image shows a calculation for number of records

Step 3:

After creating this calculated field, drag the same to the Row shelf and duplicate the measure. Use AVG() as the aggregation for both the measure.

in here, the created calculation for number of records are dragged to rows shelfs

Step 4:

For the next step, we will increase the size of the Upper pie chart and remove the Color from the below pie chart. You can do this by clicking on each of the respective columns in the row shelf to see their respective marks card.

In this image , in one of the pie chart all the values are removed to make it just a simple filled circle

Step 5:

Now we will merge both the measures by right-clicking on the ‘number of records’ and selecting the Dual-axis. Once you do this, you shall be able to see both the pie charts merged one above the other.

The number of records on the row shelf is moved to same axis by applying Dual axis

Step 6:

Now, change the color of the inner pie chart to match the color of the background i.e. white in this case. You can do this by clicking on the respective mark card which represents the inner circle and then editing the color to white.

Step 7:

Secondly, we want each sector should give the proportions of the total quantities. So we will drag SUM(Quantity) to the selected measure card that shows results on the bigger pie chart. For Percent of the total, we will add a Quick action of “percent of the total” to SUM(Quantity).

In this image we have our doughnut chart with changing the color of inner circle to white

Check out other useful charts below:

Follow us on Twitter, Facebook, Linkedin, and Tableau Public to stay updated with our latest blog and what’s new in Tableau.