cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
diskovered Member
Member

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 Member
Member

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".

 

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 91 members 1,856 guests
Please welcome our newest community members: