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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Vanessa250919
Helper V
Helper V

Convert duration to whole number

Hi community,

 

I need help, I trie to convert a duration number to whole number but in my whole number a need durations in hours 

 

Exemple : 05:02 = 5 hours 

 

Capture.JPG

 

6 REPLIES 6
Anonymous
Not applicable

Hi @Vanessa250919 ,

Please try to create a calculated column with below formula supposed to duration field is Text type:

Hour = VALUE(LEFT('Table'[Duration],FIND(":",'Table'[Duration],1,0)-1))

Best Regards

Rena

camargos88
Community Champion
Community Champion

@Vanessa250919 ,

 

Capture.PNG



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

Proud to be a Super User!



Greg_Deckler
Community Champion
Community Champion

See this article that will demonstrate how to convert to seconds and from there you could convert to hours easily. https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  I just read this post, but it's not the same problem . I don't have a duration whole number, it's my problem 🙂 Capture.JPG

OK @Vanessa250919  I'll get this right at some point, here is a duration to seconds converter: https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Sorry @Vanessa250919 I thought that article referenced this one:

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

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors