Show Me How: Configuring Totals

6 August 2015
In this post I wanted to share a few simple tips regarding the inbuilt totals functions of Tableau. These are not tricky to do and that is why I have added this to the “Show me how” section. These features are available from at least v8.1 but there are a few new ones that have been added in v9 and I will point these out as we come to them.

In this post I wanted to share a few simple tips regarding the inbuilt totals functions of Tableau. These are not tricky to do and that is why I have added this to the “Show me how” section. These features are available from at least v8.1 but there are a few new ones that have been added in v9 and I will point these out as we come to them.So to begin with the basics of turning on or off the totals within Tableau. For this example I will use a simple table of data but you could also apply these steps to charts as well.Step 1 – Create a plain table of dataUsing the superstore dataset I created a simple table of Sales and Profit per Country over the Categories and Sub-Categories. I also limited the countries to 3 so it was easier to screenshot. I’ve setup a “% of Total Profit” and “Rank of Sales” which I will use later on.Plain table of dataStep 2 – Turning on or off the Grand Totals from the menu optionsFrom the Analysis menu drop down to “Totals” and then across to “Show Row Grand Totals” and then do the same again for the Columns. In v9 you can also do this from the analysis tab behind the dimensions and measures pane. I have coloured these grand totals in blue.Turning on Grand Totals ColumnStep 3 – Turning on or off the Subtotals from the menu optionsThe Subtotals can also be turned on or off from the same menu location as the grand totals and can be done independently from the Grand Totals if you wish. In v9 you can also do this from the analysis tab behind the dimensions and measures pane. I have coloured these subtotals in yellow.Turning on subtotalsAs one alternative you can turn on or off the subtotal from the appropriate pill on the shelf but only if you have already turned on the grand totals.Turning On-Off Subtotals from the pillThis is a great tip to learn as you can actually turn off either a row or column subtotal which you cannot currently do from the menu option which is all or nothing!For example if we expanded the Country pill to show Country and State on the Column shelf with all subtotals turned on we would get another Yellow section at the end of each country. We could then use the pill menu to turn off subtotals just for the country level and keep the subtotals for the categoriesTurning On-Off SubtotalsIn Tableau v9 you get a great little feature add which helps you stay in the flow. With the new tool tip functions you can now select either a grand total or a subtotal with a left click and then use the pop up tooltip to select “Remove”. This is the same as going to the Analysis menu and unticking each item but as mentioned it keeps you in the flow and it is a lot quicker.Turning Off Subtotals from the viewPersonally I would love this tip even more if it worked more like the pill options to turn off just the one axis of subtotals and not all of them but that’s what the ideas pages are for :)Step 4 – Changing the aggregation of all totalsWhen a straightforward aggregation is being shown in the view that is not using any table calculations you can use the following options to change the way the total is calculated.To change all of the totals to use a different aggregation you can use the analysis menu and select “Total all using” to select how you would like the total to be created.Changing the Aggregation from the Anlysis menuIn v9 you can also use the new tooltip options to set the aggregation of the totals and this is the same as using the analysis menu in that it will affect all totals.Changing the Aggregation of a totalChanging the Aggregation of a grand totalIf you are following along in your own version you may be wondering why I went to the bother of making the “% of Total Profit” and “Rank of Sales”? Well this is because I wanted to show you the limitation of this “total using” option, it only works on non-table calculated measures.  The “% of Total Profit” and the “Rank of Sales” are both calculated fields that are using table calculations. If you need to change the way this sort of field is calculated then you are moving away from the basics I’ll cover here but you can find some really great guides as listed below.

Step 5 – Changing just one measure to be a different aggregationSo other than the above solutions to customise the totals I also found a great little built in feature that allows you more control over your totals other than just setting them all to be an average. If you click on a measure that is in you view you can use its drop down menu to select what aggregation to use and if wanted hide it completely if it does not make sense to show it as a total.Changing the Aggregation of one measure total from the pillI hope this blog has given you some new information and that you can make use of this in the future. I have been using Tableau for a few years now and I only recently found all of these options.If you would like the workbook with the advanced table calculations being used in the total then you get it from the below tableau public

Author:
Chris Mace
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Information Lab and data industry
Subscribe now
© 2024 The Information Lab