Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have two columns:
In time and out time - the columns are formatted in date and time. I need to find the turnaround time in minutes (in time - previous out time).
I also want the turnaround time for just the day, not between two dates. (on excel I was just doing less than 2 hours to be safe and then filtering)
Another question based on the same data, so I would need to calculate the delay time(which is the first in time for the day - 8am), any idea on how to do that? For each day, have a new column that says the delay time.
Any help is appreciated! Thank you
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
The result is showing numbers in minute.
Please check the below picture and the attached pbix file.
Turn Around CC =
VAR _currentdate =
FORMAT ( Data[In Time], "yyyy-mm-dd" )
VAR _prevouttime =
MAXX (
FILTER (
Data,
FORMAT ( Data[In Time], "yyyy-mm-dd" )
= FORMAT ( EARLIER ( Data[In Time] ), "yyyy-mm-dd" )
&& Data[Out Time] < EARLIER ( Data[Out Time] )
),
Data[Out Time]
)
VAR _result =
DATEDIFF ( _prevouttime, Data[In Time], MINUTE )
RETURN
IF ( NOT ISBLANK ( _prevouttime ), _result )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
The result is showing numbers in minute.
Please check the below picture and the attached pbix file.
Turn Around CC =
VAR _currentdate =
FORMAT ( Data[In Time], "yyyy-mm-dd" )
VAR _prevouttime =
MAXX (
FILTER (
Data,
FORMAT ( Data[In Time], "yyyy-mm-dd" )
= FORMAT ( EARLIER ( Data[In Time] ), "yyyy-mm-dd" )
&& Data[Out Time] < EARLIER ( Data[Out Time] )
),
Data[Out Time]
)
VAR _result =
DATEDIFF ( _prevouttime, Data[In Time], MINUTE )
RETURN
IF ( NOT ISBLANK ( _prevouttime ), _result )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |