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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
davidz106
Helper III
Helper III

Duration to seconds

In my souce have duration given as mm:ss, for example: 02:15 as in 2 minutes and 15 sec.

 

Power BI understands this 02:15:00 as 02 hours 15 minutes and 00 seconds. Any idea how could I get it to understand it as min:sec. 

 

I can add "00:" infront of every value in my source but I would like to find a better way.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

There is no better way other than pushing any transformation/conversion to source itself. If you do it at Power BI side, at the best, it will slightly underperform than source.

If you want to do it in Power BI, before Changed Type step, prefix "00:" in this column and then do Changed type. You can issue a Table.Replace command. Example below where Time is the column name

= Table.ReplaceValue(Source,each [Time],each "00:"&[Time],Replacer.ReplaceValue,{"Time"})

Default behavior of Power BI can't be changed. 

View solution in original post

2 REPLIES 2
Payeras_BI
Solution Sage
Solution Sage

Hi @davidz106 ,

What about adding it in Power Query before loading to the model?

Payeras_BI_0-1656436424079.png

 

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

There is no better way other than pushing any transformation/conversion to source itself. If you do it at Power BI side, at the best, it will slightly underperform than source.

If you want to do it in Power BI, before Changed Type step, prefix "00:" in this column and then do Changed type. You can issue a Table.Replace command. Example below where Time is the column name

= Table.ReplaceValue(Source,each [Time],each "00:"&[Time],Replacer.ReplaceValue,{"Time"})

Default behavior of Power BI can't be changed. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.