<< Back

How do I build a Donut Chart in Tableau?

As part of our training in Tableau at The Information Lab Ireland we like to show our clients a series of chart options. Here we take a look at the Donut Chart.

Donut Chart in Tableau

Starting off it’s probably not a bad idea to give you an idea of the concept. Effectively what we are going to do here is create two circles and use the second one to ‘carve’ the hole in the middle of the donut. Really there isn’t a huge difference between a donut and a classic pie chart but what the space in the middle of the donut allows you do is present and ‘encase’ the whole value (profit, sales etc.) while you click around the outside of the donut looking at how that whole is distributed.

How do I build a Donut Chart in Tableau?

So let’s get on with creating our two circles or pie charts and take it from there.

Create a Calculated Field in Tableau

The first thing we need to do is create two pies and we do this via a Calculated Field. Go to Analysis and click on Creat Calcualted Field. Luckily it couldn’t be simpler and really what you want to be sure of here is that you give your Calculated Fields two distinctive names. This will just help with your workflow and as we have said before it is a good habit to get into.

In this case, we are going to call our first Calculated Field ‘Outside Donut’ and the second ‘Hole in the Donut’ – no way you can mix those now, is there?

These will now appear as measures and we then bring the two of them into our Rows shelf. Outside Donut first followed by Hole in the Donut.

We then need to amend each Measure to Minimmum

Using our All Marks Card (though you can do this on the individual Marks Card too) change from the default bar to a pie. You now see we have two pie charts. They are the same colour but clearly labelled and therefore easy to distinguish.

Creating a distinction

At this point we can pull in our Dimension Departments. Our aim, for now, is to show how each department in K Good Company did in the month of January in terms of sales. We bring our category which in this case is clearly marked Department into Colour on our Outside Donut Marks Card. The pie is distributed evenly at this point because w ehave yet to drag in the sales. Where will this go?

 

Exactly, our Sales per Department is brought into the Angle on our Marks Card and now we can see how the sales of each department compare with each other. We did say that in this case we wanted to look at January. At the moment the pie (and it is still a pie) is looking at the whole year. So we need to bring our Dimnesion Month into Filters and select the desired Month.

 

Dual Axis in Tableau

Now we need to create the donut and to do this we want to sit the Outside Donut on top of what will become our ‘Hole in the Donut’.

To do this we go to ‘Hole in the Donut’, right click and select Dual Axis (see above).

The two pies will now ‘merge’ but don’t worry, simply go to your Marks Card, select ‘Outside Donut’ and increase the size until you see the different pies emerge as a brand new tasty looking donut. You can now see why doing the all the work on your ‘Outside Donut’ first pays off as it becomes clearly visible and separate from the ‘Hole’.

You can then change the either change the view from Standar to Entire View and increase or decrease the size of the circles to suite your dashboard. Finally it is worth changing the colour of your ‘Hole in the Donut’ to match the background on the dashboard but that is entirely up to you. Don’t forget to bring the Sales per Department Measure into your ‘Hole on the Donut’ and pop it on the Label in the Marks Card. Otherwise there’s not much point having the hole there int he first place.

As always be sure to tidy up your Tooltip, give your sheet a title (you can always amend this later) and change colours to reflect what’s expected in your company style guide.

Who/What is…?

The Information Lab Ireland

The Information Lab (“TIL”) is a Gold resale partner of Tableau and Alteryx and offers related consulting and training across seven territories in Europe. TIL has offices in Ireland, the UK, Germany, France, Italy, the Netherlands and Luxembourg.

Clients include Coca-Cola, Close Bros Bank, PepsiCo, Deloitte, UBS, Solar Turbines & Boston Consulting Group. The Information Lab has worked with Close Brothers Bank to support their use of Alteryx for compliance with IFRS 9.

The Information Lab Ireland is at the forefront of creating a data-driven culture in Ireland. As part of its vision, The Information Lab Ireland regularly hosts free events throughout the country to show how being data-driven can improve decision making and lead to a better understanding of the world around us.

For more on these events please like us on Facebook or follow us on Twitter

Tableau

Tableau is the gold standard for intuitive, interactive visual analytics and an established enterprise platform. Over 54,000 customers have adopted Tableau to answer more questions of their data.

 

Leave a Reply

Your email address will not be published. Required fields are marked *