cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
diskovered Regular Visitor
Regular Visitor

How to convert mm:ss to seconds (duration)

How do I convert this to seconds either via measure or m. Help is much appreciated. Thanks

 

convert.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
mwegener Member
Member

Re: How to convert mm:ss to seconds (duration)

Hi @diskovered

 

format the column with Power Query (M) as duration.

With Duration.TotalSeconds([Column]), you get the seconds.

 

Duration.png

4 REPLIES 4
mwegener Member
Member

Re: How to convert mm:ss to seconds (duration)

Hi @diskovered

 

format the column with Power Query (M) as duration.

With Duration.TotalSeconds([Column]), you get the seconds.

 

Duration.png

diskovered Regular Visitor
Regular Visitor

Re: How to convert mm:ss to seconds (duration)

Thanks. 

 

Got mine to work = Table.TransformColumns(#"Changed Type",{{"Value - Copy", Duration.TotalSeconds, type number}})

BIdevelopement New Member
New Member

Re: How to convert mm:ss to seconds (duration)

Could you please explain this in more detail?

 

I have durations in my data set that are, for example, 7 minutes 17 seconds, but powerBI auto formats the duration to be 7 hours 17 minutes 0 seconds. How can I change this?

 

mwegener Member
Member

Re: How to convert mm:ss to seconds (duration)

What is your source?

Is there a "Changed Type" step?

Maybe you could insert a "Add Prefix" step before the "Changed Type" step and change the value to this format "00:07:17".