i2tutorials

Tableau Donut Chart

Tableau -Donut Chart

 

What is Donut Chart?

This type of chart is similar to a pie chart but with a hole in the middle, giving it the appearance of a donut. Why use a donut chart when we already have a pie chart?

It should be noted that, as with all good things, we can always improve on them. When we have an empty space in the middle of a pie chart (making it a donut chart), we can include cumulative figures along with individual category values.

Consequently, a donut chart is a hollow circular chart that is divided into multiple segments in proportion to the related values. There is an empty space in the center of the chart where we can add labels that show a total value or a parameter as a whole so that you may compare it instantly with the values of the segments.

How to Create Donut Chart in Tableau?

To create a donut chart in Tableau, follow the steps below.

Step 1: Create Two Aggregate Measure Fields

In the Rows section, we will begin by creating two aggregate measure fields. Here, we double-click and enter avg(0).

A second aggregate measure is entered in the same manner.

Step 2: Select Mark Type for Measures

From the Marks list, we select Pie as the mark type for the first measure. In addition, by creating two aggregate measures, we have two sections for each measure in the Marks card. To create our Tableau donut chart, we will use these two sections discretely for both measures.

Step 3: Add Set of Fields to Get Pie Chart

We will now add a set of fields to the Color, Angle, and Label cards of the Marks section. Please note that these fields are being added to the first column of the AGG(avg(0)) field. As seen in the screenshot below, adding these fields to the appropriate columns results in a pie chart with three sections, name labels, and value labels.

By right-clicking on the SUM(Sales) field, selecting the option Quick Table Calculation, and then selecting Percent of Total, we apply a Quick Table Calculation. This will display the percentage of total sales for each category in the chart’s labels.

Step 4: Select Circle from Drop-Down List

As a next step, we right-click on the second measure field (AGG(avg(0))) in the Marks section and select Circle as the mark type.a

Step 5: Select Color Card to Change Circle Color

The circle is changed from gray to white. Select white from the given color palette by clicking on the Color card. Ensure that you are performing this step for the second measure field as well.

Step 6: Add Measure Field into Label Card

As you can see, our last step creates a white circle in the lower half of the plot area. We will add a measure field, Sales, to the Label card of the second aggregate measure section before proceeding. Below the white circle, this value displays the total sales for all three categories.

Step 7: Select Dual Axis to Combine Charts

The next step is to combine these two charts and get closer to our final tableau donut chart. Select Dual Axis from the drop-down menu when right-clicking on a measure field name in the Rows section.

Step 8: Click on Size Card to Reduce Size

As of right now, all we can see is a white circle surrounded by data labels. This is due to the fact that the two charts completely overlap each other. The second chart can be brought to the front by clicking on the Size card and reducing the size of the white circle.

Step 9: Finalise Tableau Donut Chart

We could see a donut-shaped chart with three sections and data labels once we adjusted the inner white circle. The total sales value for all three categories is shown in the center of the donut chart.

Step 10: Change the Color Scheme of the Chart

In the first measure field section, we can also change the color scheme of the chart.

The Tooltip card can also be used to format our tooltip. As a result, we have a donut chart showing total sales value for all three categories, sales value for each category, and sales percentage for each category. Different colors distinguish the three categories, making it easy to identify them.

Thus, this is the final output of  a donut chart.

 

Exit mobile version