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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.