1 Reply Latest reply on Jul 13, 2016 1:20 PM by Tom W

    Dynamic Date Filters Based on Parameters

    Anna Chan

      Hi

       

      I am trying to create dynamic date filters based on parameters. Is it possible to get a parameter has the following values (7 days/30 days/90 days/all data). The data would then show all the data from 7 days/30days/90 days before the selected period. Please let me know.


      Thanks,

       

       

      Anna

        • 1. Re: Dynamic Date Filters Based on Parameters
          Tom W

          If the standard quick filter for date isn't what you're after, create a parameter with those values then setup a calculated field which will act as your filter. For example;

           

          IF [parameterDays] = '7 days' and [SaleDate] >= dateadd('day',-7,Now()) and [SaleDate] <= Now() then 'Y'

          ELSEIF [parameterDays] = '30 Days' and [SaleDate] >= dateadd('day',-30,Now()) and [SaleDate] <= Now() then 'Y'

          ELSEIF ....... build out the rest of your scenarios

          ELSE 'N'

          END

           

          Then drag that calculated field onto the filter shelf and set it to 'Y'