Prevent dual label in donut chart in Tableau

Sasmita Sahu
Nov 1 · 3 min read

Recently while creating a donut chart, I have faced the issue of labels showing twice at the center. After some hit and trial, I finally got the solution for the same. I have recreated the same scenario based on a sample random data set.

Problem statement :

The below donut chart shows sales by different region. At the center of the chart we can see the total sales for all the region.

Now when only one region is selected in the filter, the chart looks like below:

Note:This behaviour does not occur for more than one value selection in the filter.

But does it look good?

I do not want $4470 to be shown twice in the center. It should be shown once. Now let’s get into the solution of how to fix this.

Solution:

To overcome this problem we are going to use Annotate. As we know there are three types of annotates(mark,point,area) available in tableau, here we are going to use mark type to full fill our requirement.

Steps:

  1. For the measure to be shown at the center, place that into the detail card of the inner pie chart.
  2. Right click on the center of the chart, go to Annotate and select Mark.
  3. A edit Annotation window will pop up, give the required expression .(here we will give Total Sales: <SUM(Sales)> and click ok)

4. Resize the Annotate so that it will stay centered and format it in such a way that it matches with the background color of the inner pie chart.

5. I have kept the shading of the annotate as gray to match with the inner pie chart, and no border for the box as well as for the line.

Edit Annotate Screen

6. Now If you select only one value in the filter, the chart will no longer have dual overlapping label for the measure.

Conclusion:

With the help of mark type annotate, I have achieved the required output. However it will not give the same result if point or area annotates are used .

I hope this article was helpful to you. Thanks for reading!!!

See you in the next article.


If you liked the article then don’t forget to leave a clap.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade