8 Replies Latest reply on Jan 3, 2017 10:27 AM by Ritu Poola

# How to show both label and percentage in KPI Donut

Hi,

I am new to the Tableau and looking solution as required. My data is as shown below.

There are 500 Student ids no duplicate ids and  assigned to subject like Maths,Science,Computer,Sports. These 4 subjects are fixed and repetitive  for different type of student ids ( not same student id)

 Student ID Subject 1 Maths 2 Science 3 computer 4 Sports . . . . 500 like any one above subject

Solution needed in donuts in KPI view for below requirement

Consider example like subject as Maths and assigned number of students are 150 then, in this case i need to show 3 items in the donut  KPI

a) Different colour for total 500 students and angle should change and it should change as per  Percentage  i.e 30 % ( 150/500) in Maths critaria

b) In Middle of the donuts need to show both labels text like 30% and 150 students.

c) If we put Subject as column after dummy place holders then 4 donuts should visible like Maths,Science,Computer,Sports and donuts vary

with % in angle and Middle of the donuts should have  number of students and percentage.

I am not getting the exact KPI view. sample view look like below

Thanks

Ritup

• ###### 1. Re: How to show both label and percentage in KPI Donut

Hi Ritu,

Find my approach as reference below and stored in attached workbook version 9.3

• ###### 2. Re: How to show both label and percentage in KPI Donut

Hi Norbert,

Thank you for valuable inputs and quick response..

Still i am looking for exact KPI view. If we drag the subject to columns one angle not appear as required. i have require only 2 color representaion of KPI donout one is number of id,second is angle representation.

Please check the sample view as attached.. Blue color represents total ids and orange color indicates KPI angle for individual subject ( it should vary as per percentage).

As per sample view please let me know how we can go further to get exact KPI view.

Have a Good day..

Thanking You.

• ###### 3. Re: How to show both label and percentage in KPI Donut

Hi Ritu,

Almost;) Find my updated approach below as reference and stored in attached workbook version 9.3

Still trying to get the % as a label in the middle.... Simon Runc Could you "tip in" here

• ###### 4. Re: How to show both label and percentage in KPI Donut

Hi Ritu,

are you looking for something like this??

With this method you will need to create 4 separate pie charts. Definitely not the recommended solution.

Let me know if you wish to create something like this.

Thanks and Regards,

Ashish Chaudhari

• ###### 5. Re: How to show both label and percentage in KPI Donut

Hi Nobert and Ashish,

Thank you very much for your approaches and valuable inputs which are helped me to get solution almost.

Ashish, yes i am looking for same approach. I have tried and got the labels and percentage in the middle.

Grouping is good approach but is there any approach to use only 1 pie chart instead of 4 pie charts?

Also if we drag any dimensions into the row or column then donut design is changes to different view and missing original view of donut.

In case if we get the solution by using 1 pie chart which accepts dimensions in row or column then it would be great help as required.

Have a good day,

Thank you.

Ritup.

• ###### 6. Re: How to show both label and percentage in KPI Donut

Cheers for the ping Norbert (...been having a few Xmas Tableau free days!)

Hi Ritu,

How is this for you?

I've used FIXED LoDs to generate the number of students for each subject, and then another one for the remiander...from here I can then use Measure Names/Values to create the pie's (and also label them with the count and %age)

Let me know if this isn't what you were after...or doesn't make sense

1 of 1 people found this helpful
• ###### 7. Re: How to show both label and percentage in KPI Donut

Good morning Simon,

Welcome back:) Thanks for that. Much appreciated.

1 of 1 people found this helpful
• ###### 8. Re: How to show both label and percentage in KPI Donut

Hi Simon and Norbert,

Great...! Your solution worked for me very well and the way you explained in detail is very much clear and crisp.

Thank you so much for your assistance.

Have a Great day!...

Thank you,

Ritup