1 2 Previous Next 23 Replies Latest reply on Mar 31, 2020 8:31 AM by Simon Runc

# How to create a doughnut chart inside a doughnut chart?

Hello,

So I have been tasked with creating a visual that shows an actual to budget doughnut chart, which I can do easily and with no trouble thanks to this nifty blog post Tableau Tip: How to make KPI donut charts. However, what I need to do now is to place another doughnut in the center portion of that originally created doughnut chart. A doughnut within a doughnut.

I realize I could create the first doughnut chart, export it to an image, remove the background then create the second doughnut chart, place into a dashboard and then drag the original doughnut chart as an image over it but this is far too much work to be done for the 18 charts I need to create (6 rows of 3).

So, if you have any improved suggestions please let me know!

Thanks!!

• ###### 1. Re: How to create a doughnut chart inside a doughnut chart?

Hi Dustin,

If you want to create a double Donut Chart i.e Chart within a Chart, then you need to create two separate Sheets.

For Example: Sheets 1 Contains Category wise % of Sales and sheet 2 Contains Category wise % of Profit. Now drag your first sheets as tiled and second as floating and place it at center of outer donut into the Dashboard and combine them in such a way that it should look like inner and outer circle are part of same Donut chart.

Like this: Here outer donut is representing Category wise % of Sales and inner donut % of Profit

Hope this help.

Mahfooj

• ###### 2. Re: How to create a doughnut chart inside a doughnut chart?

hi Dustin,

So I may have something for you...It's not so much a Donut inside a Donut, but more a Pie with multiple layers! (with a hole in the middle!!). In my example (using superstore) I've worked up the 3 customer segments as their proportion of total sales

So first I create a calculated field for the total sales

[Total Sales]

{SUM([Sales])}

and then the measure for the proportion of those sales from each segment

[Segment Sales Proportion]

SUM([Total Sales]) - SUM([Sales])

this part isn't important...it's just to set up the example.

now for the real bit....

So I create an index() calculation, and bring in segment to the detail tile...and set the index() to compute using = segment (I bring this into the column shelf and the size shelf)...a bit like the image below (bringing in my measures names/value to set up my pies)

next, I change the column version of index() to be index()/100000...like the below

now for the cool bit...I change my axis range to be between -2 and 2...and add the border from the colour tile

I can then (as for a regular doughnut) create a dummy axis using MIN(float(0))...dual axis them...do a bit of tarting-up and we are there.

Hope this gets you to what you need and makes sense...let me know if not.

7 of 7 people found this helpful
• ###### 3. Re: How to create a doughnut chart inside a doughnut chart?

Thank you both for your quick replies and suggestions!

Mahfooj, the technique you proposed I've tried but because I require the donuts to be flush together it does not work quite like I would like due to the white square box surrounding the floating donut.

Simon, the technique you proposed seems to be exactly what I would like to do. However, I cannot review the example you have attached due to my older version of Tableau (I'm running 9.3). If you could repost a workbook that I could review I feel I should be able to implement this technique for my purpose.

Thanks once again for both suggestions!

• ###### 4. Re: How to create a doughnut chart inside a doughnut chart?

hi Dustin,

Here you go...in 9.3

• ###### 5. Re: How to create a doughnut chart inside a doughnut chart?

Thanks Simon I really appreciate it!

I will get back to you if I have some additional questions.

• ###### 6. Re: How to create a doughnut chart inside a doughnut chart?

Just want to point out ...  you can have multiple versions of desktop on your computer.

I have versions 8.2 through 10.1 and all the versions in between.  (We use 9.3 in our shop.)

This allows me to work with others' workbooks in the version they are using.

2 of 2 people found this helpful
• ###### 7. Re: How to create a doughnut chart inside a doughnut chart?

Simon I must thank you again for your solution! It works terrific and I am 90% there.

However, I have two more questions.

1) Is it at all possible to have a different color for each segment while still maintaining the contrast between sales and sales remaining?

2) Could you integrate a calculated field(s) that would showcase if the sales exceeded the sales remaining? Maybe something like

Negative

IF [sales remaining] <0 THEN [sales remaining] END

Positive

IF [sales remaining] >=0 THEN [sales remaining] END

Then just give each of those a color. I don't know exactly but I hope it helps communicate the idea I am trying to achieve. Again, thank you soo much for taking the time to help out!!!

• ###### 8. Re: How to create a doughnut chart inside a doughnut chart?

You can try something like this. Just select the both Segment and Measure Names, using Ctrl key drag both on color. Where darker shades indicated your segment sales and lighter shades remaining sales. Hope this help.

Mahfooj

2 of 2 people found this helpful
• ###### 9. Re: How to create a doughnut chart inside a doughnut chart?

hi Dustin,

So very similar to what Mahfooj has suggested, we can create a calculated field and add this to the colour measure too. We then need to set up the pallets for each combination of entry.

In the attached I've created a simple calculation which assesses if each segment is > or < 33.3%, and then set up the colours to indicate which are over or under.

2 of 2 people found this helpful
• ###### 10. Re: How to create a doughnut chart inside a doughnut chart?

Thanks to each of you for assisting me with this visual! It worked out great and I learned a few cool tricks.

Thanks a million!

• ###### 11. Re: How to create a doughnut chart inside a doughnut chart?

Thanks Man it is a great solution.

• ###### 12. Re: How to create a doughnut chart inside a doughnut chart?

Simon Runc thanks a lot for this knowledge sharing. This has helped me a lot.

• ###### 13. Re: How to create a doughnut chart inside a doughnut chart?

Hello All,

By using simon's idea of assigning multiple small values to create layered pie and by adding 2 dummy rows in the data I am able to achieve doughnut in doughnut chart with just one sheet.

Below is the workbook for the same

Kind Regards

Shashwat jain

• ###### 14. Re: How to create a doughnut chart inside a doughnut chart?

Mahfooj,

Can you please post the workbook ?

Thanks

1 2 Previous Next