Forum Discussion
jeyare
Helper II
6 years agoIncrement 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 ...
- 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
amitchandak
Super User
6 years agojeyare ,
Try like
diff =
var _last = maxx(filter(Table,table[person]=earlier(table[person]) && table[Date] = earlier(table[Date])-1),table[performance])
return
if(isblank(_last),0,performance-_last)