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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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:
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 50 | |
| 43 | |
| 36 | |
| 33 | |
| 30 |
| User | Count |
|---|---|
| 138 | |
| 126 | |
| 60 | |
| 59 | |
| 56 |