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
I’m trying to replicate an Excel Report to a Power BI Report that is a time duration. Right now I am not getting the total time duration that I need.
Here are two columns from the Excel Report.
Here are two columns from the Power BI Report.
The left-hand column is correct because it is a new category that is only a day old. The right-hand column is incorrect because it is not showing the total duration. For example, the entry that says ’14:18:24’ should say ‘134:18:24’. I am using military-time with my calculations.
Does anyone know how I can get Total Time Duration on Power BI?
Thanks
Dan
Solved! Go to Solution.
It is leaving out the hours of the full days, the difference between 134:18:24 and 14:18:24 is 120:00:00 which is 5 days.
If you have the duration in seconds you can convert it to show the whole amount with a measure like this.
Full Duration =
VAR _Seconds = [Duration Seconds]
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _Hours = INT ( DIVIDE ( _Minutes, 60 ) )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
IF (
NOT ISBLANK ( [Duration Seconds] ),
FORMAT ( _Hours, "00" ) & ":" &
FORMAT ( _RemainingMinutes, "00" ) & ":" &
FORMAT ( _RemainingSeconds, "00" )
)
That will return a duration that looks like this:
Your solution worked even though I needed to convert to seconds before I could use the measure that you showed me above...thanks!!!!
It is leaving out the hours of the full days, the difference between 134:18:24 and 14:18:24 is 120:00:00 which is 5 days.
If you have the duration in seconds you can convert it to show the whole amount with a measure like this.
Full Duration =
VAR _Seconds = [Duration Seconds]
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _Hours = INT ( DIVIDE ( _Minutes, 60 ) )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
IF (
NOT ISBLANK ( [Duration Seconds] ),
FORMAT ( _Hours, "00" ) & ":" &
FORMAT ( _RemainingMinutes, "00" ) & ":" &
FORMAT ( _RemainingSeconds, "00" )
)
That will return a duration that looks like this:
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.