Forum Discussion
vs531
3 years agoNew Member
Apply filter on CURRENTGROUP
Hi I am trying to calculate the difference between the last and previous observations for each ID. In the dataset, I have multiple observations for each ID over time. As a first step, I want to cre...
- 3 years ago
vs531 , In case you need a new column
Diff =
var _max = maxx(filter(Table, [ID] = earlier([ID]) && [Date] < earlier([Date]) ) , [Date])
return
[Score]- Maxx(filter(Table, [ID] = earlier([ID]) && [Date] =_max ) , [Score])
vs531
3 years agoNew Member
Thanks amitchandak