Forum Discussion
Freeseman
3 years agoHelper II
Dump time difference between 2 shifts
Hello, I hope you can help as i am battling to find away to calculate the time difference beween 2 dumps over 2 shifts. I will explain: I need a calculation that takes the latest time of shi...
- 3 years ago
Try this measure:
Minutes Diff = VAR vLastDumpShift1 = CALCULATE ( MAX ( ShiftData[DUMP_END_TIMESTAMP] ), ShiftData[DUMP_END_SHIFT_IDENT] = 1 ) VAR vFirstDumpShift2 = CALCULATE ( MIN ( ShiftData[DUMP_END_TIMESTAMP] ), ShiftData[DUMP_END_SHIFT_IDENT] = 2 ) VAR vResult = DATEDIFF ( vLastDumpShift1, vFirstDumpShift2, MINUTE ) RETURN vResult
DataInsights
3 years agoSuper User
Try this measure:
Minutes Diff =
VAR vLastDumpShift1 =
CALCULATE (
MAX ( ShiftData[DUMP_END_TIMESTAMP] ),
ShiftData[DUMP_END_SHIFT_IDENT] = 1
)
VAR vFirstDumpShift2 =
CALCULATE (
MIN ( ShiftData[DUMP_END_TIMESTAMP] ),
ShiftData[DUMP_END_SHIFT_IDENT] = 2
)
VAR vResult =
DATEDIFF ( vLastDumpShift1, vFirstDumpShift2, MINUTE )
RETURN
vResult
Freeseman
3 years agoHelper II
Thank you.
This looks like it could be the answer. I however get this message:
Any idea how i should format the date to be able to do the calculation?