8 Replies Latest reply on Dec 4, 2018 4:18 AM by Anuj Gupta

    Alternative of context filter

    Anuj Gupta

      Dear Folks,

       

      My requirement is very simple. Please help me out.

       

      I am having 3 months of data in a data. I want to show top 5 of each months. So to display it, I used context filter. but it slows down the performance of the view.

       

      Is there any alternative simple way to do it ?

       

      Thanks in advanced

        • 1. Re: Alternative of context filter
          Hari Ankem

          Context filters usually help in increasing the performance. So, we need to see what you are doing in your workbook and understand how you are able to quantify that the performance has become slow. So, please attach your packaged workbook (.twbx) with data.

          • 2. Re: Alternative of context filter
            Ritesh Bisht

            Hi Anuj,

             

            Use performance recording to see the real reason for the slowdown.

             

            Create a Performance Recording - Tableau

             

            Here you need the context filter I guess but the thumb rule is that your data volume should go down by 10% at least in order to see

            the real improvements.

             

            Thanks,

            Ritesh

            • 3. Re: Alternative of context filter
              Ritesh Bisht

              Speed up Context Filters

              To improve performance of context filters, especially on large data sources, follow these general rules.

              • Using a single context filter that significantly reduces the size of the data set is much better than applying many context filters. In fact, if a filter does not reduce the size of the data set by one-tenth or more, it is actually worse to add it to the context because of the performance cost of computing the context.
              • Complete all of your data modeling before creating a context. Changes in the data model, such as converting dimensions to measures, require recomputing the context.
              • Set the necessary filters for the context and create the context before adding fields to other shelves. Doing this work first makes the queries that are run when you drop fields on other shelves much faster.
              • If you want to set a context filter on a date you can use a continuous date. However, using date bins like YEAR(date) or context filters on discrete dates are very effective.
              • 4. Re: Alternative of context filter
                Anuj Gupta

                Hi Hari,

                 

                I can not share the twbx here as it is developed on virtual desktop and there is not way to extract from there.

                 

                But in this case. I have used parameter [on the two dimensions ]which is used as filter on the top of context filter. So when user is selecting values it is taking to much time to display result.

                • 5. Re: Alternative of context filter
                  Anuj Gupta

                  is there any to develop a chart without using context filter ?

                   

                  Requirement :

                   

                  I am having 3 months of data in a data. I want to show top 5 counts w.r.t one dimensions of each months.

                  • 6. Re: Alternative of context filter
                    Hari Ankem

                    You can probably  achieve the same functionality with LODs or table calculations. Please explore.

                    • 7. Re: Alternative of context filter
                      Peter Fakan

                      Hi Anuj,

                       

                      Do you mean like this ?

                       

                      Step 1 - Prepare dataset. I filtered to 2018 and excluded the months I didn't need - I'm guessing you will have a more elegant method of setting this up.

                       

                      Step 2 - Create index

                      Step 3 - Convert index to a discrete measure (blue pill) and drag onto viz in between the 2 elements you want to partition - in this case its month and sub-category. Then select Specific Dimensions and ensure that the month field is above the dimension that you wish to sort by, and then change the restarting every value to Month.

                       

                       

                      Step 4 - CTRL drag the Index field over to filter, and select top 5.

                       

                      HTH 18.3 attached

                       

                      Peter

                      1 of 1 people found this helpful
                      • 8. Re: Alternative of context filter
                        Anuj Gupta

                        Brilliant sir . Thank you so much .. its helpful.. thanks again