Forum Discussion
Calculate difference from previous 'row'
Hi guys,
Hoping you can help.
We have a requirement to report on the difference in days between the previous value. I have the Date, Project Number, Total Days and i now need the difference from the previous row. I have added and index and index.1 column thinking i could then use them to calculate, it's almost there but as you can see from the screenshot it's not quite right as it has the negative next to it, i'll be using this on a line graph so i just need the positive value.
The calculation i have is
Thanks!
DonnaDonut85 , Try a new column lik
New column =
var _max = maxx(filter('ProjectStats', [requested_date]< earlier([requested_date])),[requested_date])
return
[TotalDays_] - maxx(filter('ProjectStats', [requested_date]=_max),[requested_date])
2 Replies
- amitchandakSuper User
DonnaDonut85 , Try a new column lik
New column =
var _max = maxx(filter('ProjectStats', [requested_date]< earlier([requested_date])),[requested_date])
return
[TotalDays_] - maxx(filter('ProjectStats', [requested_date]=_max),[requested_date]) - DonnaDonut85Frequent Visitor
Thanks amitchandak ! 🙂