Good to fully understand what a context filter is. I don't want to reword this quote as I use it on all engagements when the question is asked, "What's the difference between a context filter and a regular filter?"
"Each filter accesses all rows in your data source without regard to other filters. However, you can set one or more categorical filters as context filters for the view. You can think of a context filter as being an independent filter."
"It doesn't make any sense to show "1st Grade" when "Secondary Education" is selected on the Parameter Filter."
This sounds like something is going on with the data, try to include a workbook moving forward so others can assist you with your problems. Stuardo Herrera this is always good because you're able to get a definitive answer when attempting to get a quick answer OR at the very least we can ask you more questions regarding the attached TWBX.
Senior Business Consultant
1 of 1 people found this helpful
@Stuardo - I'm guessing that you are using two Tableau parameters (with corresponding calculated fields used as filters), and what you are asking for is to have one parameter's options change based on a given selection in the other parameter? Unfortunately, that's not possible in Tableau at this time, parameters are static, single-valued elements. Sometimes we can simulate the desired results via separate data sources and/or data blends using some combination of Filter Actions and/or scoped filters, but as Tyler noted we'd need more info (such as a packaged workbook).
@Tyler - The Tableau docs for context filters are out of date and inaccurate, here are several specific points:
- Data source filters (added in v8) take precedence over all other filters, so context filters (and all other filters) are dependent on data source filters.
- Top & Conditional Filters effectively have precedence over General & Wildcard filters, which makes for another level of dependence. New users run into this one all the time when they do a TOP 10 Filter on something like the Product Item dimension and then separately filter for a specific Product Category and wonder why they aren't seeing 10 values, but only 2 values.
- Filters using blended calculations are processed in Tableau after aliases, densification, and the blend happen, so they are dependent on results from multiple data sources as well as pill arrangement, mark type, alias configuration, etc., not just a single source as the documentation describes.
- Table calc filters don't directly access any rows in the data source, they only access the aggregated query results and are also computed after aliases, densification, and all data blends.
This post by Andrew Ball is a fantastic reference for understanding the levels of filters: http://www.theinformationlab.co.uk/2013/08/12/cascading-quick-filters-in-tableau/
I have a calculated field called Booking_Size with formula:
IF RANK_PERCENTILE(SUM(BK_Total)) >= 0 AND RANK_PERCENTILE(SUM(BK_Total)) < .5 THEN 'Small'
ELSEIF RANK_PERCENTILE(SUM([BK_Total])) >= .5 AND RANK_PERCENTILE(SUM([BK_Total)) < .7 THEN 'Medium Small'
ELSEIF RANK_PERCENTILE(SUM([BK_Total])) >= .7 AND RANK_PERCENTILE(SUM([BK_Total])) < .9 THEN 'Medium'
ELSEIF RANK_PERCENTILE(SUM([BK_Total])) >= .9 AND RANK_PERCENTILE(SUM([BK_Total)) < .95 THEN 'Medium Large'
ELSE 'Large' END
I want to make this a context filter because if I use any other filter on top of the above filter the RANK PERCENTILE function in the above filter(Booking_Size filter) is recomputing the already filtered table.
I am not able to add this calculated field as a context filter. Please help me.
You get that you are responding to a three year old thread, where Jonathan offered a one year old solution, right?
Any chance I can talk you into posting a brand new question? When you do I hope you will do the following:
- Post a sample packaged workbook
- Describe your question succinctly
- Describe your desired outcome specifically
Do that and you will get a great deal of help, almost immediately!
Will open a new thread.