12 Replies Latest reply on Feb 10, 2017 6:15 AM by Jay Morehart

# Donut chart

Hello,

I'm trying to create a donut chart where it show the percentage of completion of a certain staff, of a certain program. i tried doing it however, i wasn't able to make it appear.. the angle.. can anyone help?

• ###### 1. Re: Donut chart

Hi

PFA

1 of 1 people found this helpful
• ###### 2. Re: Donut chart

hello nipun,

Sorry but i can't open the workbook that you edited as the version is different.

• ###### 3. Re: Donut chart

I think this is what you are looking for. I have 10.1 so I cannot send the workbook back, but I can show some screen shots.

there are a couple of ways to do this, what I did here was to use measure names and measure values for color and angle, respectively.

if you want the label to show the percentage and not the counts you will need a couple of calculated fields

eg: [Percent Complete] = Sum([Completed])/(Sum([Completed]) +Sum([Not completed]))

Another option would be to create a Status calculated field (complete/not complete) put that on color and number of records on angle

[Status] =

If [Completed] = 1 and [Not completed] = 0 then "Complete"

elseif [Completed] = 0 and [Not completed] = 1 then "Not Complete"

else "error"

END

hope this helps!

1 of 1 people found this helpful
• ###### 4. Re: Donut chart

Follow intructions : Creating Doughnut Charts | Tableau Software

Bests Regards

Veronica

4 of 4 people found this helpful
• ###### 5. Re: Donut chart

Hi Jay,

for the percent not complete, is the formula similar to the percent complete? and the measure names under the filter, is every selected?

i tried the status formula but it cannot but used at the angle in the marks card. Thank you.

• ###### 6. Re: Donut chart

Hi veronica,

That did not work for me as i need to filter the different individual staff and to show the percentage of completion as well as not completed in one chart.. and not all of the staff in one pie.. is there any solution? Thank you.

• ###### 7. Re: Donut chart

yes the percent not complete is the same as the percent complete, just change the fields.

For the second method, the status field goes on color (its a dimension so it is used to break up (or categorize) the data, then Number of records (or some kind of Count/CountD depending on your data) goes on angle ( angle has to be a measure)

hope that helps

• ###### 8. Re: Donut chart

for measure names, just drag measure names to color, and than remove the ones you do not want from the measure names card, Tableau automatically adds it to the filter shelf

• ###### 9. Re: Donut chart

Hello Jay,

I tried but then the angle and the number that came out isn't right. i kept getting over 100%. i tried both methods but i got almost the same issue..

• ###### 10. Re: Donut chart

Can you post your workbook so I can take a look?

Sent from my android device.

• ###### 11. Re: Donut chart

Hello,

attached is the workbook. thank you for helping

• ###### 12. Re: Donut chart

you are missing a set of parentheses in the denominator of the percent functions:

SUM([Not completed])/SUM([Not completed]) + SUM([Completed])

vs

SUM([Not completed])  /  (SUM([Not completed])+SUM([Completed]))

After I changed that I had to take every thing off of angle and color and put it back on using measure values and measure names.