1 Reply Latest reply on Jul 19, 2018 7:03 AM by Zhouyi Zhang

    Today, Yesterday, Today&Yesterday parameter

    raoul.tller

      Hi,

       

      I am trying to create a Today, Yesterday, Today&Yesterday parameter which will return me the data for the selected. Data source contains minute data (so datetime).

      I found a similar solution for date ranges somewhere where you would use ALL dates from Date and then create a Date Modified where you select Non Null dates.

       

      CASE [Date Option]

      WHEN 1 THEN

          IF  [Date] = TODAY()

          THEN [Date] END

      WHEN 2 THEN

          IF  [Date] <= TODAY()

              AND

              [Date] > DateAdd('day', -1, TODAY())

          THEN [Date] END

      WHEN 3 THEN

          IF  [Date] <= TODAY()

              AND

              [Date] > DateAdd('day', -1, TODAY())

          THEN [Date] END

      ELSE

          [Date]

      End

       

      For today it only returns me 19-7-2018 00:00 while there more hours/minutes present in the data.