Forum Discussion
Castillo3CS
1 year agoFrequent Visitor
Calculating time between rows
Hi Team, We're having trouble calculating time elapsed for vehicles that are idling. Sensor data for each vehicle is being sent and we need to know how much time a vehicle (bus_id) has spent in i...
Anonymous
1 year agoNot applicable
Hi, Castillo3CS
I modified some of your formulas.
Next = MAXX(FILTER(Ralentis,
Ralentis[bus_id]=EARLIER(Ralentis[bus_id]) &&
Ralentis[Date]<EARLIER(Ralentis[Date])
),Ralentis[Date])Column = IF([sensor_value]>=701, 0,IF(ISBLANK([Next]),
ABS(DATEDIFF([Date],NOW(),SECOND)),
ABS(DATEDIFF([Date],[Next],SECOND))
)
)
Please check, is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Castillo3CS
1 year agoFrequent Visitor
Hi Anonymous ,
I'm still getting some very odd values for time difference, notice the 1125431 and the 1125280. If we do the math between the two dates there’s now way we’re getting those numbers.
I was going to try something with index columns but I'm in the middle of implementing it, so I’m not sure it’ll work.
Thanks a lot for the help.