9 Replies Latest reply on Feb 22, 2017 3:53 AM by Akram Ebrahim

    Context Filter Doudt

    rajenras raj

      Hi,

       

      I saw some articals to know the difference between set as Context and Relevant values in filters.But did not understand the concept.Please help me to understand the difference.

       

      Thanks

        • 1. Re: Context Filter Doudt
          Akram Ebrahim

          Hi Rajenras,

           

          Refer this link Cascading Quick Filters in Tableau - The Information Lab

          Hope this helps you get some clarity.

           

          Thanks

          Akram

          1 of 1 people found this helpful
          • 2. Re: Context Filter Doudt
            rajenras raj

            Hi,

             

            Thanks for providing Link.

             

            Only Relevant Values is a little more subtle. This means the quick filter list will show all the values that are left after applying the other filters, if those filters are on the same or a higher level in the hierarchy.

             

            This Means Region show East Value show only Zone1 Values which is selected in first filter.Please correct me my understanfg is correct.

             

            Thanks.

            • 3. Re: Context Filter Doudt
              Tharashasank Davuluru

              Hi,

               

              From Tableau desktop online help:By default, all filters that you set in Tableau are computed independently. That is, 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. Any other filters that you set are defined as dependent filters because they process only the data that passes through the context filter

               

              We use "Context" filters to improve Report Performance, Main usage is it is scanning the limited amount of data not entire data base. Like Slice performing in the Cube.

               

              For an example we are having the Data for year 2010,2011,2012,2013,2014.

               

              Normal Filter: Year 2012,2013,2014.  ------- Here Report scans all records of the Database then applying the filter.

              Context Filer: Year 2012,2013,2014------ Here Context filter will scan the data of year 2010,2011,2012.

              And Context filter is applicable to the all reports which are using the database.

               

              Relevant Values:

              It used to show only related data in another Filter.

               

              If we define the Relevant between Country & States (Country to States),

               

              If we select Country "USA", USA related values only available in State Quick Filter.

               

              Working:

              It works by attempting to create a TEMP table in the database (which may or may not always succeed, depending on the database and your permissions - we are assuming that TEMP tables succeed for this blog post).

               

              In an actual test against a 40 million row table, we ran a context filter on a very wide and a more narrow Tableau result set. The wide data connection took 47.57 seconds to A) create the TEMP table, B) index the columns and C) query the "number of records". You can see all of this in the Tableau desktop logs. By the way, it's worth pointing out how amazing this fact is, that Tableau generates all of the correct SQL code for this. However, the result is huge and wide. This data connection had 50 dimensions and 32 measurements.

              We ran the same exact "add to context" test against a second data connection which only had 11 dimensions and 4 measurements. This time the query took 13.98 seconds. This was a 340% reduction in query time!

               

              Helpful Link: http://www.alansmitheepresents.org/2013/09/tableau-add-to-context-filters.html

               

              Thanks,

              Tharashasank

              1 of 1 people found this helpful
              • 4. Re: Context Filter Doudt
                Akram Ebrahim

                Yes. You got it right!

                Only relevant values option on quick filters will show the values filtered based on the higher level filter in a hierarchy.

                 

                Thanks

                Akram

                1 of 1 people found this helpful
                • 5. Re: Context Filter Doudt
                  rajenras raj

                  Hi,

                   

                  At Last Please correct my understanding here with in simple word.

                   

                  Context Filter : It does not scan the data base and gets data from Lowest Hierarchy

                  Relevant Values : It scans the data base and result is same.

                   

                  My Conclusion is both will give the same results but the way of Interacting for fetching data is different.

                   

                  Thanks,

                  • 6. Re: Context Filter Doudt
                    rajenras raj

                    Hi Akram,

                     

                    Hi,

                     

                    At Last Please correct my understanding here with in simple word.

                     

                    My Conclusion is both will give the same results but the way of Interacting for fetching data is different.

                    Please educate me my assumption is correct?

                    Thanks,

                    • 7. Re: Context Filter Doudt
                      Akram Ebrahim

                      Hi Rajenras,

                      All filters will work on top of tableau datasource only.

                      Context filter is applied on tableau datasource before applying quick filter.

                      So quick filters works on top of context filter results.

                       

                      Thanks

                      Akram

                      • 8. Re: Context Filter Doudt
                        rajenras raj

                        Hi Akram,

                         

                        Thanks for reply.

                         

                        If we select Relevant Values option  in the filter  means it will apply after Quick filter .So obviously context filter having more performance.

                         

                        Please correct me.

                         

                        Thanks

                        • 9. Re: Context Filter Doudt
                          Akram Ebrahim

                          Hi Rajenras,

                           

                          Yes. In that case you can have both filters(Context and Quick) to improve performance!

                           

                          Thanks

                          Akram

                          1 of 1 people found this helpful