Forum Discussion
Anonymous
4 years agoNot applicable
Timediff between 2 rows depending on index
Hi all,
How would I calculate the time difference between 2 rows depedning on an index column?
Example:
Waste Stop: 2021-03-17 05:52:47
Waste Start: 2021-03-17 06:32:36
Index: 0
Wanted result: time difference (format could be seconds..)
Anonymous , Create a new column like
new column =
var _max = maxx(filter(Table, [Index] = earlier([Index]) -1 ),[Waste Stop])
return
datediff(maxx(filter(Table, [Index] = earlier([Index]) -1 ),[Waste Stop]),[Waste Start], second)
2 Replies
- amitchandakSuper User
Anonymous , Create a new column like
new column =
var _max = maxx(filter(Table, [Index] = earlier([Index]) -1 ),[Waste Stop])
return
datediff(maxx(filter(Table, [Index] = earlier([Index]) -1 ),[Waste Stop]),[Waste Start], second) - AnonymousNot applicable
Just perfect!
Thank you!