3 Replies Latest reply on Jun 30, 2016 12:54 AM by Matan Bracha

    How to validate date filter on set

    Matan Bracha

      Hi All,

      I have a Histogram that shows "Top 5 and Others". This is how I created it:

      1. A parameter called "Top Measure".

      2. A set on a field called "Campaign Name":

      3. A calculation called "Top&Others Calculation": IF [CampaignSet] THEN [Campaign Name] ELSE "Others" END

       

       

      - This is how the graph looks like with dates filter for 1-29/06/2016:

      - This is how the graph looks like with dates 16-29/06/2016:

       

      My dates filter is a calculation: IF [Event Date]<=[To Date] AND [Event Date]>=[From Date] THEN "Show" ELSE "Hide" END

      When "From Date" and "To Date" are date parameters.

       

      You can see that when I filter the dates to a smaller period - the calculation is not updated, and I don't get the "new" top 5 campaign (Top Measure=5 in my example).

      So my question is this: how can I validate my date filter so that the set will be updated? so I can see the real top 5 campaigns?

      On what the calculation happens? does it take the value for all the dates in the data and calculate on them?

       

      Hopefully someone knows a bit more then I do...

      Thank You!

        • 1. Re: How to validate date filter on set
          Bharath P

          Hi,

           

          As per my understanding a set directly hits the data source table. If your filter condition has different set of output when compared to over all output, tableau is going to showcase only the intersection of filter conditions output and over all output with out any filter condition.

          In this case, make your date filter as context filter by clicking on "Add to Context" option. This will generate a temporary table with your new date filter condition and this temporary table acts as a data source table for your view and so you will see the correct output.

           

          - Bharath

          • 2. Re: How to validate date filter on set
            Chris Dickson

            Hi Matan,

             

            from your description i think you should make the date filter part of the context, do this by right clicking on the pill in the filter shelf and 'add to context' it should turn grey and your table calcs should now work.

             

            if not this then i would ask you include a workbook with your next post as it would be a lot easier to fix something we can see and touch.

            • 3. Re: How to validate date filter on set
              Matan Bracha

              Thank you very much

              Worked wonderfully!