6 Replies Latest reply: Sep 30, 2016 9:52 AM by Sean Villacorte RSS

    Pick up dates less than or equal to selection

    Sean Villacorte

      Hi guys,

       

      I'm trying to create a measure "Max Date" that will base my selection from my filter for month and day.  When I make a selection Month=Feb and Day=2. I want to be able to show all dates less than or equal to the date I have selected.

      So basically dates from Jan 1 to Feb 2.... Below is my code for my chart expression. Appreciate any guidance/help.

      Cheers-sv

       

      If(Year(max([MaxDate]))<=YearDate

      and Month(max([MaxDate]))<=MonthDate

      and Day(max([MaxDate]))<=DayDate, date([MaxDate]),

      date(max([MaxDate])))