1 2 Previous Next 15 Replies Latest reply on Jan 4, 2019 1:26 AM by Simon Runc

# Multiple donut charts in single sheet/dashboard

Hi

I want to show a dashboard with donut charts. I have 10 categories, for each one i need a donut chart.

When doing so, the donut charts are overlapped and cluttered (check sheet "multiple cat" in attached file). What i want is to show 5 donuts on a row and the other 5 on another row.

is that possible ? Tableau can allow me only to put "Category" on either columns or rows shelf!

Thanks

• ###### 1. Re: Multiple donut charts in single sheet/dashboard

Hi Ammar,

So yes there is a technique for doing this in Tableau...creating lots of little charts (as this technique is generally for), are known as Small Multiples (I really like them, and use them quite a bit).

Some of the ideas in this are a little advanced, but you can just copy this, until the understanding gradually seeps in (that's how it worked for me anyway!)

So first we create an index calculation, to run over each Category (and so give it a number...in your case this will be 1-10)...btw I've also created a parameter [Number of Columns:Parameter], so you have control on the number of columns, but can hard code this value if you know the number of categories id fixed.

[Index of Category]

index()

Then we create a calc for the row number each donut will be on

[RowVal]

[Index of Category]/[Number of Columns:Parameter]

Then we use this to determine, which row each will be on

[Row]

if [RowVal]=int([RowVal]) then

[RowVal]

elseif

[RowVal]<0 then int([RowVal])

else

int([RowVal]+1)

end

...also make this discrete

Then for the column number

[Column]

IIF(([Index of Category] % [Number of Columns:Parameter])=0,[Number of Columns:Parameter],[Index of Category] % [Number of Columns:Parameter])

..again make this discrete.

Then bring the Category onto the detail tile, and put [Row] on the row shelf, and [Column] on the column shelf...We then set the compute using on both to be Category...and voila we're done!

As you change the [Number of Columns:Parameter] you'll see the arrangement change that number of columns.

3 of 3 people found this helpful
• ###### 2. Re: Multiple donut charts in single sheet/dashboard

Thank you very much Simon. This is exactly what i want and it is brilliant.

• ###### 3. Re: Multiple donut charts in single sheet/dashboard

When i have like 60 different categories (which leads to 60 donut charts). They will fit into a single pane and thus the dount size becomes really small.

Is there a way to keep the size of the donut big and have a vertical scroll bar to scroll down ?

Thanks

• ###### 4. Re: Multiple donut charts in single sheet/dashboard

hi Ammar,

Yes if you bring them onto a dashboard, and then set the view to "Fit Width". Then you can enlarge the spacing per category. .gif below shows what I mean

Hope that helps.

1 of 1 people found this helpful
• ###### 5. Re: Multiple donut charts in single sheet/dashboard

Thanks Simon !

• ###### 6. Re: Multiple donut charts in single sheet/dashboard

Is there away to enlarge the vertical spacing for the category when there are multiple donut charts ? ( for example :  5 rows with 3 columns).  Tableau is making the box for each category fixed and i cannot get the cursor to enlarge it.

Thank you.

• ###### 7. Re: Multiple donut charts in single sheet/dashboard

hi Ammar,

So by tweaking the Row Size and Donut Size you can increase this....

is that what you mean?

1 of 1 people found this helpful
• ###### 8. Re: Multiple donut charts in single sheet/dashboard

Hi simon

Yeah, actually i had to 'show header' for rows and columns to change the sizes.

• ###### 9. Re: Multiple donut charts in single sheet/dashboard

I used the same technique of small multiples to generate some line chart data (like the attached twbx file). I am trying to add some additional information (like the attached photo) to put contributor name and summations ( sum(additions), sum(deletions)) .   How can add those to each small chart ?

Thank you.

• ###### 10. Re: Multiple donut charts in single sheet/dashboard

Hi Ammar,

So this is possible, but is a little tricky (as we are no longer using the "real" Contributors headers).

One way to do this is to use a dual axis to get the titles in...

In the attached I created the following calculation, which will be the Maximum Commits (over the data, at the week level). This just ensures that they are all at the same height

{MAX({FIXED [Contributor], DATETRUNC('week',[Commit Date]): SUM([Commits])})}

I then use this as an Axis, and set up the label as follows

This ensures I only get one "label" per small multiple. I also changed the Reference Line Label, so it was well out of the way. The drawback is that it can only plot this at the start of any data for each small multiple, so they are not aligned (left to right).

Hope that helps, and makes sense...

1 of 1 people found this helpful
• ###### 11. Re: Multiple donut charts in single sheet/dashboard

Thanks very much Simon, those Label options for the "field" and "label minimum value" are cool , although new to me.

The formula for the label to be on same height is brilliant ! as i tried with other dual axis options and did not work out.

that was a great help.

• ###### 12. Re: Multiple donut charts in single sheet/dashboard

Awesome!...yes it's not perfect, but it's pretty good!!

1 of 1 people found this helpful
• ###### 13. Re: Multiple donut charts in single sheet/dashboard

Hi Simon,

• ###### 14. Re: Multiple donut charts in single sheet/dashboard

Hi @Simon Runc

Great post and i have created similar donuts for my organization. However i am experiencing an anomaly. I have a fiscal year column in my data. When i am clicking on a particular month, in my case Feb, Nov or Oct the pies are changing the donuts.

In reference to your worksheet, for example if i change the month to february, the subcat1 for the cat 1 donut will move to cat 2 donut and show up instead of subcat 1 for cat2 donut. Similarly the subcat1 for cat 2 donut will move forward and show up on cat 3 donut's subcat 1?

Its a weird issue. i am posting some screenshots from my dashboard, you can refer to it.

Please help me on this issue as i am unable to understand why this issue is only occurring for certain months and only for one particular category.

Thanks,
Ajinkya

Andy Kriebel

Ken Flerlage

Bora Beran

1 2 Previous Next