Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SAMBWILLANS
Frequent Visitor

Sum of duration over 24 hours

Hi There

im recording course times in PowerBi as time  (hh:mm:ss) however we have a number of course that are now over 24 hours.

 

I had the following in to calculate a sum which worked fine once all courses were under 24 hours but now we have additonal data this is throwing out the sum.

 

sum of duration =
VAR _sum=sum(Dashboard_All_Course_Completion[Duration (HH:MM) for Reporting])*86400
VAR _h=int(_sum/3600)
VAR _m=int((_sum-_h*3600)/60)
VAR _s=int(_sum-_h*3600-_m*60)
return _h

 

 

SAMBWILLANS_0-1667900607157.png

 

Any ideas how I can tackle this?

 

Many Thanks in advance for the help!!!!

 

Sam 

2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

There is a special data type dedicated to this kind of calculations. It's called Duration. Both, in Power Query and in DAX.

I've tried changing the data type but this just errors out. Any additional suggestions?

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.