Currently, Tableau does not support putting discrete aggregates like the result of IF SUM([Sales]) > 10000 THEN "Show" ELSE "Hide" END on the Filters Shelf, nor creating Quick Filters from those. This is described in the following KB article: http://kb.tableausoftware.com/articles/knowledgebase/adding-calculated-field-to-filter-shelf. I'd like Tableau to support this function, the main reason being to reduce a point of friction in the user experience.
There are of course issues like when is the domain computed, and how is the domain computed? What happens when a value is selected for the filter that no longer exists because the level of detail in the view changed? While acknowledging these, from a selfish user point of view I don't really care whether it's hard or not, I just want to be able to drag the "Sales KPI" pill onto the Filters Shelf just like all my other pills. And, again from a user point of view, it seems like Tableau is "so close" already:
- Tableau has already tackled these questions within table calculations, where the domain is the level of detail of the view, and the quick filter is all the possible values. However, table calculation filters are processed late in the pipeline and bring a number of complexities that we want to avoid for the "simple" Show/Hide case. A filter on aggregates would reduce the result set *before* table calculations occur, thereby avoiding the complications introduced by using table calculation filters.
- Filters on continuous aggregates are normally processed in the HAVING clause in the data source, while dimension filters go into the WHERE clause. However, when we're using a blend with a calculated field in the primary that pulls data from the secondary such as SUM([Sample - Coffee Chain (Access) 8.0].[Sales]), the computation in the primary for this blended calculated field is happening inside Tableau (not the SQL query). A filter on that field is also processed inside Tableau after the blend, again at the level of detail of the view, and a quick filter uses all the values of the cells in the view. So Tableau already has a capability to compute the domain, generate the new fancy v8 Quick Filter range display, and apply the filters. I bring this up to point out that if the stumbling block is trying to push as much of the computation as possible into the data source, Tableau already has a precedent for doing computation itself, hiding the complexities, and reducing the result set.
- We can work around any discrete aggregate filtering problem by turning the discrete into a number. Why can't Tableau get a little smarter and just do that for us behind the scenes for booleans, at the least, where it's totally clear the domain will never have more than three values (True, False, and Null)?
If this were implemented, one hard problem is definitely the interaction between Quick Filters and Show All Values/Relevant Values, I don't have anything to say on that other than I'm already used to there being complexities there (though the complexities that drive me the most batty are the ones where the quick filter is being computed in the cache or data source while the data is coming from the other).
[I did a search to see if this was already an Idea and didn't find one, if there is then I'll link to that. Also, the impetus for this was this discussion here: ]