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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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