Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm really new to Power BI and was asked to create a report that shows the average drop off time at our warehouse. What is the best way to calculate the time difference based off of a variable in another column?
Essentially I need to take every UDC listed and see the time taken between the Pickup and Dropoff.
Solved! Go to Solution.
Hi @Anonymous
you can try create a measure
Avg Time =
AVERAGEX (
VALUES ( TableName[UDC] ),
CALCULATE (
DATEDIFF ( MIN ( TableName[TIME] ), MAX ( TableName[TIME] ), SECOND )
)
)
Hi @Anonymous
you can try create a measure
Avg Time =
AVERAGEX (
VALUES ( TableName[UDC] ),
CALCULATE (
DATEDIFF ( MIN ( TableName[TIME] ), MAX ( TableName[TIME] ), SECOND )
)
)
Thanks for the reply @tamerj1
I input the code into Power BI and it gives me a Avg time of zero. I do have a filter set up so that it can limit the results down to the last 7, 14, and 30 days.
This is the code that I have put in.
I actually had to create a new table. Once I moved the function over there it started to work.
Avg Drop Off Time In Seconds =
AVERAGEX (
VALUES ( 'IN THE LAST'[UDC] ),
CALCULATE (
DATEDIFF ( MIN ( 'IN THE LAST'[Time Format] ), MAX ( 'IN THE LAST'[Time Format] ), SECOND )
)
)
Thanks for pointing me in the right direction.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!