Tableau can quickly and easily add Tableau totals and Tableau subtotals to a table or chart. It enables you to show just Tableau totals, just Tableau subtotals, or both together. Additionally, you can specify which fields you want Tableau subtotals on, and at what level of aggregation (i.e. sum, avg, etc.).
How to Find Tableau Subtotals and Tableau Grand Totals
1. Let’s build a table. Bring Measure Names to Columns.
2. Drag Customer Segment and Marketing Channel and Product Category to the Rows shelf.
3. Drag Measure Values to the Text marks card.
4. Add Measure Names to the Filters shelf. Click the down arrow on Measure Names and select Show Filter. A box will appear on the right with all the Measure Names. Uncheck everything except Sales and Profit.
5. Go to the Analysis menu at the top. Mouse over Totals.
6. Several options will appear. Check “Show Column Grand Totals.”
7. Next check “Add all Subtotals.”
You’ll now have a view with two levels of Tableau subtotals (subtotal of each Marketing Channel, and of each Customer Segment), and grand totals along the bottom.
- Row and column grand totals add everything in either the row or the column. Rows go across, columns go up and down.
- The Tableau subtotals will add a total for each dimension in your view, similar to a Pivot Table in Excel.
- Note that Tableau subtotals will add a total for each dimension, except the last one. In this case, Product Category is the lowest level of granularity, so you won’t add a Tableau subtotal to each procedure (each row of the table). That data is already shown and subtotaling it in Tableau would be redundant; it would show the same thing. Instead, Tableau will create a subtotal for each Customer Segment and Marketing Channel.
How to Format Tableau Subtotals and Grand Totals
Now let’s add some formatting to the table to make it more readable.
8. Go to the drop-down box on the top toolbar that says “Standard.” Change that to “Fit Width.” This will provide more space for our columns, making them more readable.
9. Format the headers of the table by right clicking on them at the top and choosing Format.
10. A box will appear prompting you to change different formatting elements. Choose Font, then set them to blue.
- Note that it formats the headers along the dimensions in blue as desired. However, it leaves the headers for the measures off. You have to specify you want those to look the same.
- Right click where those are still black and follow the same procedure as before.
11. Format the Tableau subtotals. Right click the Tableau subtotal that is in the same column as Marketing Channel field. The formatting menu will again pop up.
12. Be careful to format only the totals (seen in the middle of the formatting pane under the header Totals).
13. Change the font to the same color blue and ensure it is bolded.
14. Click the paint can icon at the top of the format window.
15. You’ll see several sections that we’ll utilize. First, go to the Totals section, and under the Pane drop down, set the color to a light blue. Do the same for the Header drop down.
16. Under the Grand Total section, ensure that those are both set to none. Often when you change the Totals section above, Tableau defaults to formatting that as well. In this case, we only want the Tableau subtotals formatted.
17. Under the Row Banding section, there are two drop downs, Pane and Header. You can use these to add shading to the rows of your table to make them more readable. There are also 2 sliders: Band Size and Level. Band Size almost always leave to the default of 1. Level enables you to control where you want the banding to occur.
18. In this case, set the Pane and Header drop downs for row banding to None. This option removes any color banding to make the table more readable from the rows. Now, the only row banding will be on the Tableau subtotal’s lines.
19. Right click the Tableau subtotal in the Product Category column. Format the totals to be orange.
20. You should now have a blue Tableau subtotal for the Marketing Channel and an orange Tableau subtotal header for the Product Category. You can format the total numbers themselves by right clicking on them and choosing format.
21. Finally, right click in the values of the table and choose Format. Click the alignment icon at the top of the menu.
22. Set Pane to Center to center align the values of the table.
Did you have fun learning how to find and format Tableau Subtotals and Grand Totals? If yes, you are just in time for our immersive online individual Tableau training course! Want to train your team? We also offer corporate Tableau classes taught by our best Tableau experts!