Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
The source data has duplicate Route Identifiers and duplicate Route Start Times. I'm trying to find the
average Route Start Time without duplicates and ignore blank values.
Below is a sample of the data:
Any help would be appreciated!
Solved! Go to Solution.
Hi @clarkpaul ,
Create a calculated column to convert the time to seconds.
_seconds = HOUR('Table'[Start Times])*3600+MINUTE('Table'[Start Times])*60+SECOND('Table'[Start Times])
Then create a measure like below.
Measure =
var _avg = SUMX(ALL('Table'),'Table'[_seconds])/CALCULATE(COUNT('Table'[Identifiers]),'Table'[Start Times]<>BLANK())
return
VAR hours =
ROUNDDOWN ( _avg / 3600, 0 )
VAR minutes =
ROUNDDOWN ( MOD ( _avg, 3600 ) / 60, 0 )
VAR seconds =
INT ( MOD ( _avg, 60 ) )
VAR milliseconds =
round(MOD ( _avg, 1 ) * 100,0)
RETURN
FORMAT(hours,"00") & ":"
& FORMAT(minutes, "00")
& ":"
& FORMAT(seconds, "00")
Best Regards,
Jay
Perfect, thank you!
Hi @clarkpaul ,
Create a calculated column to convert the time to seconds.
_seconds = HOUR('Table'[Start Times])*3600+MINUTE('Table'[Start Times])*60+SECOND('Table'[Start Times])
Then create a measure like below.
Measure =
var _avg = SUMX(ALL('Table'),'Table'[_seconds])/CALCULATE(COUNT('Table'[Identifiers]),'Table'[Start Times]<>BLANK())
return
VAR hours =
ROUNDDOWN ( _avg / 3600, 0 )
VAR minutes =
ROUNDDOWN ( MOD ( _avg, 3600 ) / 60, 0 )
VAR seconds =
INT ( MOD ( _avg, 60 ) )
VAR milliseconds =
round(MOD ( _avg, 1 ) * 100,0)
RETURN
FORMAT(hours,"00") & ":"
& FORMAT(minutes, "00")
& ":"
& FORMAT(seconds, "00")
Best Regards,
Jay
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.