Donut Chart in Tableau

The sales team in our Salesforce org was analysing the leads’ status. They needed to visualize the data statistics of the lead status that can be used in a presentation. To visualize this data in Tableau, we can use a pie chart. However, we also wanted to display the total number of leads in the center of the chart, which is why we created a Donut chart in Tableau.

In this blog, I will explain how to create a Donut chart in Tableau using real-time data examples.

What is a Donut Chart in Tableau?

A donut chart is a circular chart with a hole or circular space in the middle. In Tableau, there is no built-in option to create a donut chart; we need to customize a pie chart to make it resemble a donut chart.

To create a donut chart in Tableau, we need to make two pie charts on top of each other using a dual-axis method. The outer pie displays the actual data segments (like proportions or categories), while the inner pie, a smaller, white circle, covers the center to form the hollow space. This customization makes two overlaid pie charts appear as a single donut chart.

Create a Donut Chart in Tableau

To create a doughnut or donut chart, I have used the leads data from my Salesforce.org. To use the Salesforce data in Tableau, we need to connect the Salesforce data to Tableau.

You can also set a connection with other external tools or connect to the Superstore sample data in Tableau.

We have two methods through which we can create a Donut chart in Tableau:

  • Create a Donut Chart in Tableau using a Pie Chart
  • Create a Donut Chart in Tableau using an Image file

Create a Donut Chart in Tableau Using a Pie Chart

Follow the steps below to create a donut chart in Tableau by using a pie chart.

  1. After connecting the data source, click on the Sheet in Tableau. In the Marks section, select the type as Pie.
Create a Doughnut Chart in Tableau
  1. Add the fields to the color card in the Marks section, and to display its label, add it to the Label card also.
  2. After adding the fields and labels, you might see that the labels are overlapping or not displaying. Here, set the view from Standard to Entire View.
Tableau doughnut chart

Now, the pie chart will display the data labels and share of the fields (from whole) as shown in the image below.

Tableau Chart in Doughnut format
  1. Now we need to clone this pie chart so that it overlaps with the current pie chart, making it appear as a donut chart. For that, click the Analysis tab and select Create Calculated Field.
Display Donut Chart in Tableau

Check out: Stacked Bar Chart With Multiple Measures in Tableau

  1. Label the calculated field as Dummy Axis, and in the formula field, enter the formula MIN(1), then click OK.
Create Dummy Axis in Tableau Donut Chart
  1. Drag the calculated field Dummy Axis twice to the Rows section. Now, you will see a clone of the current pie chart.
Create a Donut Chart in Tableau
  1. In the second pie chart, remove the labels and the fields.
Add Circle for donut chart in Tableau
  1. In the Rows, click on the second instance of the Dummy Axis and select Dual Axis.
Custom Donut Chart in Tableau

As we select Dual Axis, the second pie chart will overlap with the first one.

Check out: Stacked Bar Chart in Tableau

  1. Reduce the size of the overlapped chart from the Size card in the Marks section.
Adjust size in Tableau donut Chart
  1. To change the color of the centre of the Donut chart, click on the Color card of the second Dummy axis and select the color. Here, I have selected the white color.
Change color in Tableau Donut Chart

Now, the end result will look like the Donut chart shown in the image below.

Tableau Donut Chart Circle

This way, we can create a donut chart in Tableau by using two pie charts.

Check out: Add Charts to Reports in Salesforce

Create a Donut Chart in Tableau Using an Image File

In this method, we will create a donut chart using a pie chart. To make a circular space in the center, resembling a donut chart, we will use a circular image in the center of the pie chart.

Follow the steps below to create a donut chart in Tableau using the pie chart and the image file.

  1. Click on the Sheet tab and in the Marks section, select the type as Pie.
Create Donut chart using image in Tableau
  1. Drag the ‘Lead Status‘ field to the ‘Color’ card and ‘Label‘ card. After this, add Lead count to the Label card to display the number of leads in a specific lead status.
Use png image to create Donut Chart in Tableau
  1. After this, set the view from Standard to Entire View. Now, the pie chart will look as shown in the image below.
Add image in Tableau Donut Chart
  1. Now, we will add a circular image at the centre of the pie chart to display it as a donut chart. For this, we need to open this sheet in the Tableau dashboard.

Click on the Dashboard tab and drag the Sheet to the dashboard canvas.

Create a Donut Chart in Tableau using Image
  1. In the Objects section, click on Image.
Create Tableau donut chart using image
  1. Select the image from your browser and ensure it is in PNG format. Also, the image should be circular instead of a regular rectangular image.

The circular image will get centered to display the pie chart as a donut chart. If you don’t have a circular image in PNG format, you can download it from “www.freepik.com“.

Add image to donut chart in Tableau

Check out: Create Stacked Bar Charts Dashboard in Salesforce

  1. Make the image type as floating so that we can drag it to the centre of the pie chart.
Create Donut chart with pie chart in Tableau
  1. At last, drag the image and drop it at the centre of the pie chart. After adding the image, the pie chart will be displayed as a Donut chart.
Types of Donut charts in Tableau

This way, we can create a donut chart in Tableau using a pie chart and a PNG format image.

By following the above two methods, you can easily create donut charts in Tableau by creating or modifying a pie chart and displaying the data statistics in a donut chart format for better data visualization.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.