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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
efilipe
Helper IV
Helper IV

Power m to convert from d.hh:mm:ss to seconds

Hello,

 

I'm trying to convent, using power M, a duration column with the format "d.hh.mm.ss" to seconds.

 

I used a custom column: to seconds = [Video Playtime]*86400. Worked fine, but not when I have date in "Video Playtime" column.

 

image.png

 

Any suggestions?

 

Thanks!

2 ACCEPTED SOLUTIONS
Tahreem24
Super User
Super User

Hi @efilipe ,

 

Please apply the step as per given screen shot attached.

sec.JPG

Please give Thumbs up for Support and accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

az38
Community Champion
Community Champion

@Tahreem24 @efilipe 

Seconds only extract second, for total seconds press "Total Seconds"


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
Tahreem24
Super User
Super User

Hi @efilipe ,

 

Please apply the step as per given screen shot attached.

sec.JPG

Please give Thumbs up for Support and accept this as a solution if it helps you!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
az38
Community Champion
Community Champion

@Tahreem24 @efilipe 

Seconds only extract second, for total seconds press "Total Seconds"


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thanks @az38 !

Or you can try below M Code.

 

= Table.TransformColumns(#"Changed Type",{{"Duration", Duration.TotalSeconds, type number}})

 

Please give KUDOS  for Support!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.