8 Replies Latest reply: Nov 20, 2015 9:22 AM by Sinan Ozdemir RSS

    Measure as PreviousPeriod's value

      Hi there, this is my first question. Sorry I haven't been able to find the answer in the forum.

       

      Imagine, for simplicity's sake, I have 1 dimension and 1 measure with just 5 rows:

       

      DayAmount
      120
      225
      335
      430
      540

       

      I need to add a new measure that works out on the fly the amount of the previous day, so I can compare them accross the day dimension:

        

      DayAmountAmount_previous_day
      120N/A
      22520
      33525
      43035
      54030

       

      What is the expression that allows me to do it?

      (Have in mind that, for day=1, there's no previous value).

       

      thanks a lot