Forum Discussion

jeyare's avatar
jeyare
Icon for Helper II rankHelper II
6 years ago
Solved

Increment of previous date value

Hi, can't find a solution for callculation of increments based on few conditions.   Current table example in my Power Query: date person performance 4.4.2020 A 10 4.4.2020 B 12 ...
  • Greg_Deckler's avatar
    6 years ago

    So basically, as in the article referenced, something like:

     

    Increment Column =
      VAR __Current = [performance]
      VAR __PreviousDate = MAXX(FILTER('Table',[person] = EARLIER([person]) && [date] < EARLIER([date])),[date])
      VAR __Previous = MAXX(FILTER('Table',[person] = EARLIER([person]) && [date] = __PreviousDate),[performance])
    RETURN
      __Current - __Previous