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 moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi Team,
Newbie here,
I am using below measure to calculate the difference between 2 date/time stamp per employee ID.
Result:
This works well, however, I wanted to get the datediff of the current task after the next task. So in above image, START should have the value of 142 seconds because it measures the duration of the START task till the user stamps the next TASK which is BREAK.
So in above example I wanted to have a result like this:
Kudos and Thank you so much for the help ! I will greatly appreciate it.
Solved! Go to Solution.
Hi @Anonymous
Is this a measure or a calculated column?
Instead of _PreviousTaskTime , create
VAR _NextTaskTime =
CALCULATE (
MIN ( RealTimeData[Date] ),
ALLEXCEPT ( RealTimeData, RealTimeData[EmpName] ),
RealTimeData[Date] > _CurrentTaskTime
)
and the use the differfence:
_NextTaskTime - _CurrentTaskTime
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
Hi @Anonymous
Is this a measure or a calculated column?
Instead of _PreviousTaskTime , create
VAR _NextTaskTime =
CALCULATE (
MIN ( RealTimeData[Date] ),
ALLEXCEPT ( RealTimeData, RealTimeData[EmpName] ),
RealTimeData[Date] > _CurrentTaskTime
)
and the use the differfence:
_NextTaskTime - _CurrentTaskTime
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
Hi @AlB ,
Whoaa ! That's pretty fast. Thanks for the solution. I just retweaked my variable _PreviousTaskTime to change from MAX to MIN and then the correct output shows up.
Thank you so much!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
91 | |
86 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |