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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Gamdalf
Frequent Visitor

[h]:mm:ss formatting calculating days rather than counting hours beyond 24

Hey all, 

I run a spreadsheet extract through a cruncher for a contact centre that calculates times in [h]:mm:ss format

Example would be if a team total had 6 people working 8 hours, the total team time for that day would display as "48:00:00"

I've Powerqueried this and set the Data Type as Time, and changed the Format to h:nn:ss as there isn't a [h]:mm:ss format in PowerBI

 

Instead of diplaying the total hours, I'm getting visuals showing 2:00:00 (ergo, 2 days instead of 48 hours)


Is there any way I can get my visuals to calculate the total hours, and not summarise the time to be days, but still retain the time capture format as it's valuable to be able to see the specific time values as it's part of adherence reporting

 

Thanks!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Gamdalf 

herer is a workaround for you.

 

measure =
VAR _TOTAL=sum('Table'[time])*3600*24
VAR _h=int(_TOTAL/3600)
VAR _m=right("0"&int(mod(_TOTAL,3600)/60),2)
VAR _s=right("0"&_TOTAL-_h*3600-_m*60,2)
return _h&":"&_m&":"&_s
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@Gamdalf 

herer is a workaround for you.

 

measure =
VAR _TOTAL=sum('Table'[time])*3600*24
VAR _h=int(_TOTAL/3600)
VAR _m=right("0"&int(mod(_TOTAL,3600)/60),2)
VAR _s=right("0"&_TOTAL-_h*3600-_m*60,2)
return _h&":"&_m&":"&_s
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors