Forum Discussion
Return previous month value based on ID
- 3 years ago
Anonymous , My mistake , it should me maxx
Previous value =
var _min = maxx(filter(Table,[ID] = earlier([ID]) && [Date] < earlier([Date]) ),[Date])
return
maxx(filter(Table,[ID] = earlier([ID]) && [Date] =_min),[Current Value])
Thanks but this doesn't work i'm afraid. It returns the value if it has changed over the time period and not what it was the previous month. See below
Anonymous , My mistake , it should me maxx
Previous value =
var _min = maxx(filter(Table,[ID] = earlier([ID]) && [Date] < earlier([Date]) ),[Date])
return
maxx(filter(Table,[ID] = earlier([ID]) && [Date] =_min),[Current Value])
- Anonymous3 years agoNot applicable
So unfortunately this still doesn't return the desired result.
It's finding the previous instance regardless of the date. I only want it to look at the previous month. So for September it should be showing blank and not 1 as there is no record of the ID in August