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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rosscortb
Post Patron
Post Patron

Sum hours and minutes

Hello

 

I added a custom column to convert seconds to hrs and mins and then another column to round this to nearest half hour. How do I create a column or measure that will give me the total time in hours and mins please, since its a time value?rounded.PNG

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @rosscortb ,

 

Refer to this blog:

https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@V-lianl-msft  Hello, Thanks for reply.  I added the Dax formula to a new column and it worked. However, it comes out as Text, therefore you can't add it to get total hours and mins, any ideas? Thanks Ross

Hi @rosscortb ,

 

Refer to this thread:

https://community.powerbi.com/t5/Desktop/Seconds-to-Hours-Minutes-sum/m-p/888051 

This is the way to calculate the total.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@rosscortb , Try like

time(hour(round(hour([time]+minute([time])/60,second([time])/3600),0)),0,0)

 

You can use roundup or rounddown in place of round

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

sorry, is this done in power query?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.