Forum Discussion
Anonymous
4 years agoNot applicable
Calculate difference between consecutive rows filtered by SELECT DISTINCT
I need to calculate the difference between values in consecutive rows and display the value in the 2nd of each pair of rows, apparently without the help of an index. Specifically, I created a calcul...
- 4 years ago
Anonymous , Try a new column like
New column =
var _max = maxx(filter(Table, [PERMIT_ID] =earlier([PERMIT_ID]) && [ACTION DATE] <earlier([ACTION DATE])) , [ACTION DATE])
return
[WORKDAYS SINCE FILED] - maxx(filter(Table, [PERMIT_ID] =earlier([PERMIT_ID]) && [ACTION DATE] = _max) , [WORKDAYS SINCE FILED])
amitchandak
Super User
4 years agoAnonymous , Try a new column like
New column =
var _max = maxx(filter(Table, [PERMIT_ID] =earlier([PERMIT_ID]) && [ACTION DATE] <earlier([ACTION DATE])) , [ACTION DATE])
return
[WORKDAYS SINCE FILED] - maxx(filter(Table, [PERMIT_ID] =earlier([PERMIT_ID]) && [ACTION DATE] = _max) , [WORKDAYS SINCE FILED])
- Anonymous4 years agoNot applicable
How do you get around the "EARLIER refers to an earlier row context which doesn't exist" problem? It's very stubborn.