Nov
24
Hiding Subtotals at Single Subcategory in Tableau
I was alerted by an old request in Tableau forum dated year 2012.
https://community.tableau.com/ideas/1364
Today I found a solution for it. It needs 5 calculated fields, plus conditional formatting. The solution is based on custom total and subtotals method pioneered by Zen Master Jonathan Drummey.
We will use the Superstore data as an example, excluding a few subcategories to emulate a single subcategory in a category.
Here are the steps:
1. Union the data set with itself in the data source editor
This will add a new dimension Table Name to the data source.
2.Create 5 calculated fields
- Subcategory New
This adds 'Total' as a Subcategory.
- Sales New
This will show the equivalent calculation of Grand Total using custom grand total technique.
https://community.tableau.com/ideas/1364
Today I found a solution for it. It needs 5 calculated fields, plus conditional formatting. The solution is based on custom total and subtotals method pioneered by Zen Master Jonathan Drummey.
We will use the Superstore data as an example, excluding a few subcategories to emulate a single subcategory in a category.
Here are the steps:
1. Union the data set with itself in the data source editor
This will add a new dimension Table Name to the data source.
2.Create 5 calculated fields
- Subcategory New
This adds 'Total' as a Subcategory.
- Sales New
This will show the equivalent calculation of Grand Total using custom grand total technique.