Forum Discussion
Anonymous
8 years agoNot applicable
Help with Measure
Hi, I need help from you guys for calculating the difference between two time stamps , below is as example of the exact output that I need. Appreciate your help ! ID Time Received Action ...
- 8 years ago
Hi Anonymous,
glad it worked out for you. For formatting the result, you may find these additional measures useful:
DiffMinutes = QUOTIENT([Diff], 60) DiffSeconds = [Diff] - [DiffMinutes] * 60 DiffMinSec = [DiffMinutes] & "." & FORMAT([DiffSeconds],"00")
If all you need is the [DiffMinSec] you can fold it together as:
DiffMinSec = QUOTIENT([Diff], 60) & "." & FORMAT([Diff] - QUOTIENT([Diff], 60) * 60,"00")
Ashish_Mathur
8 years agoSuper User
Hi Anonymous,
Try this calculated column formula
=if(Data[Action]="Out",[Time Received]-CALCULATE(MAX(Data[Time Received]),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Time Received]<EARLIER(Data[Time Received]))),BLANK())
Hope this helps.
Anonymous
8 years agoNot applicable
I tried using the formula, but it gives a difference in Date's
col = if('Events (3)'[list.list.assetState.name]="isNoMotion",'Events (3)'[Timestamp]-CALCULATE(MAX('Events (3)'[Timestamp]),FILTER('Events (3)','Events (3)'[Timestamp]<EARLIER('Events (3)'[Timestamp]))),BLANK())
- Ashish_Mathur8 years agoSuper User
Hi,
Format that column as a Time entry.