Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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 shift 1 "Dump_End_Timestamp" and the earliest time of shift 2 "Dump_End_Timestamp" to give me its difference in Minutes. Keeping in mind by selecting the dump location.
Is this possible?
Solved! Go to Solution.
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
Proud to be a Super 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
Proud to be a Super User!
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?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
86 | |
84 | |
66 | |
49 |
User | Count |
---|---|
140 | |
114 | |
108 | |
64 | |
60 |