When you place dimensions and measures on different shelves in Tableau (Rows, Columns, Marks, Filters, etc...), Tableau is generating a query to the underlying data source applying the correct grouping, aggregations, filtering, etc...
Let's say, in a simple example, the view that results from the field placement in the view is a bar chart with 4 bars. That means that even if the underlying data for those 4 bars is millions of rows, there are only 4 rows of data being returned to Tableau's data engine. That's when table calculations get applied. So a % of total is the percent of the total for each bar. If you apply a regular filter that changes the number of bars (e.g. to 3) or the value of each bar, then the table calculation will give different results.
However, you can use a table calculation as a filter. That will apply the filter after the other table calculations. One way to create a table calculation filter is to create a calculated field like this:
and then place that field on the Filters shelf.
I've attached a workbook with two tabs to let you see the different behavior.
Table Calc Filters.twbx 383.6 KB
Fantastic, Joshua. Thanks for the behind the scenes breakdown and for helping me with my problem. Thank you very much for your help and time.
Hi All ,
This information was helpful for me.
But I am facing a new issue, I am trying to add parameter for top X dimension, but its not working.
Please help me out.
Joshua, What would be the formula setup if we want to add the Calculated Filter across the datasource or a few worksheets?
Example: LOOKUP(ATTR([Market]),0) used to keep Market % of totals viewable