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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Convert Hours:Minutes:Seconds to Minutes in Power BI

Hi Experts

 

How could you convert 08:30:00 into minutes as a column in a table. So if a employee has workd 08 hr  and 30 minutes and zero seconds i want to show this as minutes only (calculated column)

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

what do you want this

Screenshot_3.png

or that

Screenshot_4.png

View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

Check this article: https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/3...
You can adjust the formula to convert into minutes

Ahmedx
Super User
Super User

what do you want this

Screenshot_3.png

or that

Screenshot_4.png

rsbin
Super User
Super User

@Anonymous ,

There are a number of ways this can be done.  Here is one solution:

Duration_Minutes = 
VAR _Hours = VALUE(( LEFT( [Duration], 2 ) * 60 ))
VAR _Minutes = VALUE( MID( [Duration], 4,2))
VAR _Seconds = VALUE(RIGHT( [Duration], 2)/ 60 )
RETURN
    _Hours + _Minutes + _Seconds

Assumes all of your Duration is the exact format xx:yy:zz

rsbin_0-1702064693979.png

Hope this helps.

Regards,

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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