How to Create a Donut Chart in Tableau?

Based on different data structures, I will show you how to create a donut chart in two scenarios. Click here to download the interactive dashboard.

Scenario I: I would like to present revenue by product category. In the table, we have Product Category and Revenue fields.

Step 1: Under Marks, select the Pie mark type. Drag Product Category to Color. Drag Revenue to Size.Screen Shot 2017-07-28 at 4.48.03 PM.png

Step 2: Drag Number of Records to Rows twice. Right click both instances of Number of Records, and then select Measure(Sum) > Minimum.Screen Shot 2017-07-28 at 4.50.05 PM.png

Step 3: On Rows, right click the second instance of Min(Number of Records), and then select Dual Axis.Screen Shot 2017-07-28 at 4.54.38 PM.png

Step 4: Right click secondary axis, then select Synchronize Axis.Screen Shot 2017-07-28 at 4.57.08 PM.png

Step 5: At the bottom of the Marks card, click Min(Number of Records) (2). Remove Product Category from Color and remove Revenue from Size.Screen Shot 2017-07-28 at 4.59.55 PM.png

Step 6: Click Color, and then click white or same color as the background. Click Size, and then drag the slider to the left to make the circle smaller.Screen Shot 2017-07-28 at 5.02.47 PM.png

Step 7: Right click on each of the axes and uncheck Show Header. Right click the grid line in the middle of the chart, click format, then remove the row Grid LineScreen Shot 2017-07-28 at 5.06.36 PM.png

Step 8: Adjust the size of the donut chart, show label, and fit the chart in entire view. Also we can sort it by right click Product Category, then sort based on sum of the revenue descending.Screen Shot 2017-07-28 at 5.11.37 PM.png

The donut chart is done! You can put other labels, such as product category, as needed.Screen Shot 2017-07-28 at 5.13.43 PM.png

Scenario 2: I would like to present refunds % to gross revenue. Unlike the first scenario, we do not have a category. We have three fields: refunds, gross revenue and net revenue. I want to distinguish the color by refunds and net revenue. The steps are different, but the concept is the same.

Step 1: Drag Measure Names to Filters shelf. Only select Net Revenue and Refunds because they are what we want to present in the chart.Screen Shot 2017-07-28 at 5.37.58 PM.png

Step 2: Drag Measure Names to Color and Measure Values to Size. Select Marks as Pie. Screen Shot 2017-07-28 at 5.40.51 PM.png

Step 3: Drag Number of Records twice to the Rows shelf. Right click both instances of Number of Records, and then select Measure(Sum) > Minimum.Screen Shot 2017-07-28 at 5.45.34 PM.png

Step 4: On Rows, right click the second instance of Min(Number of Records), and then select Dual Axis. Right click the second instance of Min(Number of records) again, then select Synchronize Axis.Screen Shot 2017-07-28 at 5.50.00 PM.png

Step 5: At the bottom of the Marks card, click Min(Number of Records) (2). Remove Measure Names from Color and remove Measure Values from SizeScreen Shot 2017-07-28 at 5.54.18 PM.png

Step 6: Click Color, and then click white or same color as the background. Click Size, and then drag the slider to the left to make the circle smaller. Clean the chart like we did for scenario 1 step 7 and 8 to make it pretty. Also, add labels to make the chart more descriptive.

Note: if you want show the label inside the donut, then you need to drag the metrics under MIN(Number of Records)(2).Screen Shot 2017-07-28 at 5.58.49 PM.png

The Refunds % Donut Chart is done! You can also add other labels as necessary.

Screen Shot 2017-07-28 at 6.08.04 PM.png

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s