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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss 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.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.