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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors