By: Eric Parker
Eric Parker lives in Seattle and has been teaching Tableau and Alteryx for 5 years. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email.
As you likely know from using Table Calculations in Tableau, they only compute against the marks displayed in a worksheet. Check out this webinar in you need a refresher.
That means when a filter is applied to the worksheet, a table calculation will update to reflect only the data present in the worksheet.
Take this chart for instance:
If we filter the Technology category out of the view, the remaining bars will still add up to 100%:
If we want the percentages to remain stable even if data is filtered out of the view, we need to compute the percentages before the filters. Because table calculations compute after the filter, we need a different solution.
Notice in Tableau’s order of operations that totals and Table Calculations happen after Dimension Filters but FIXED expressions occur beforehand.
So instead of Tableau’s default percent of total calculation:
We’re going to create our own using the curly braces from the FIXED expression.
This ensures the FIXED denominator won’t be affected by dimension filters so the % won’t change when filters are applied:
Looking for help on a Tableau problem? Sign up for an office hour to get help from an expert so you can move on to bigger and better things!