6 Replies Latest reply on Nov 6, 2015 2:09 PM by Shawn Wallwork

    "Add to Context" Parameter Filters

    Stuardo Herrera

      Hi everyone. I have to use Parameter Filters, because I am filtering data from two different data sources. The thing is that the two Parameter Filters that do this, are related between each other. One Parameter filter is "Educational Level" and the other one is "Grade". It doesn't make any sense to show "1st Grade" when "Secondary Education" is selected on the Parameter Filter.


      Is there a way to simulate the "Add to Context" functionality on Parameter Filters?

        • 1. Re: "Add to Context" Parameter Filters
          tyler garrett

          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."

          - Context Filters


          Similar situation:

          Parameters and Condition 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.




          Tyler Garrett

          Senior Business Consultant

          Professional Services

          Tableau Software


          Visualize and Understand Tableau Functions

          • 2. Re: "Add to Context" Parameter Filters
            Jonathan Drummey

            @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/





            1 of 1 people found this helpful
            • 3. Re: "Add to Context" Parameter Filters

              Hello Jonathan,

              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.

              • 4. Re: "Add to Context" Parameter Filters
                Shawn Wallwork

                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!


                • 5. Re: "Add to Context" Parameter Filters

                  Im sorry.

                  Will open a new thread.

                  • 6. Re: "Add to Context" Parameter Filters
                    Shawn Wallwork

                    Perfect. Please ping me Shawn Wallwork and I'll try to help you.