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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.