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
KGBOR
Helper I
Helper I

Convert hh:mm:ss to mm:ss either in Power Query Editor or in DAX

I have a hh:mm:ss: value coming in from a raw data and I'd like to convert that to mm:ss as the time value itself is below 1 hour so the "hh" part brings no value. How can I convert or remove that "hh" part? I found that in Power Query editor I can get out the minutes and second separately and might be able to combine them but that'd just put way too burden on the entire model.

 

Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @KGBOR ,

 

If the column is time type, you could try this formula:

 

Column = FORMAT('Table'[Column1],"nn:ss")

vjaywmsft_0-1653377635687.png

If the column is text type, you could try this formula:

Column = RIGHT('Table'[Column1],5)

vjaywmsft_1-1653377770976.png

 

Best Regards,

Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @KGBOR ,

 

If the column is time type, you could try this formula:

 

Column = FORMAT('Table'[Column1],"nn:ss")

vjaywmsft_0-1653377635687.png

If the column is text type, you could try this formula:

Column = RIGHT('Table'[Column1],5)

vjaywmsft_1-1653377770976.png

 

Best Regards,

Jay

mahoneypat
Microsoft Employee
Microsoft Employee

Please see this article. The best way to handle durations is to keep them as a decimal, do your aggregations, and then format them at the end with "mm:ss".

Calculate and Format Durations in DAX – Hoosier BI

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@KGBOR , new column in power query

#time(0,Time.Minute([TimeCol]) , Time.Seconds([TimeCol]) )

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

Thank you @amitchandak ! For some reason it still kept the hh part at the beginning. Is there any method for such conversion?

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