2 Replies Latest reply on Jul 29, 2012 8:43 PM by Leigh Fonseca

    How to display trailing N weeks from a Parameter Date selection

    Leigh Fonseca

      I am using a parameter to select the dates to display in my vis.  I created the parameter [Select Start Date] based on the [Start Date] dimension and then I created a calculated field called [Date Display] that evaluates whether the parameter [Select Start Date] matches the [Start Date] dimension.  I put the [Date Display] dimension on the Filters shelf and it correctly filters the date to the singluar start date. No problem there.

       

      Now I want to graph a measure for all start dates between [Select Start Date] and the trailing four weeks.  To get the trailing four weeks date I created a calculated field [Start Date - 4 weeks] as date(dateadd('day', -28,[Start Date])). 

       

      How can I modify my Date Display Calculated field to display all the Start Dates between the parameter[Select Start Date] and [Start Date - 4 weeks]. 

       

      Thanks in advance.  Demo workbook attached.

       

      == Date Display Calc Field

      if [Start Date] = [Select Start Date]

      then 1 else 0

      end