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
bmilheim
Regular Visitor

Converting text time column to time column

I have a report that provides me with the duration of time that has passed but it is a text column w/ years months, days hours mins and seconds.  I'd like to convert this to a time column.  Any help would be greatly appreciated.  

 

bmilheim_0-1655843848973.png

 

1 ACCEPTED SOLUTION

Sorry to hear "I was able to get the years, months, days, hours, mins and seconds columns but now I am stuck.   

 

I want to help but you need to be a bit more spefic 

 

Click here to download a solution 

Then edit the Facts table and look at each of the steps.

On the Added Custom step click on the gear wheel icon to view the formula.

Congrats you know know how to get the duration in seconds !

 

Please click thumbs up and accept as solution button. Thank you. 

 

speedramps_2-1656534908823.png

 

 

 

View solution in original post

8 REPLIES 8
speedramps
Super User
Super User

Please provide example data as tables not a screen shots next time. 

Then we can impoort the data and build examples.

Just copy and paste the table into the forum chat.

 

Foe your solution use Power Query add column from examples

to add new columns for year, min, day, hours, mins, sec

 

Then convert these collumns to dates time using the Power Query Date.From Time.From commands

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

 

 

My bad, I should have thought of that

 

0 years 0 mons 0 days 3 hours 46 mins 44.00 secs

 

Click here to download a solution 

 

The Power Query converts the text string to duration in seconds 

 

The DAX formula then displays seconds in a HH:MM:SS format

 

Tweak it yourself if you want year, months and days

 

I prefer to teach members to DIY rather just give them a 100% solution.

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

I do not understand how to get the Duration in seconds column to work.  

 

I was able to get the years, months, days, hours, mins and seconds columns but now I am stuck.  

 

 

Sorry to hear "I was able to get the years, months, days, hours, mins and seconds columns but now I am stuck.   

 

I want to help but you need to be a bit more spefic 

 

Click here to download a solution 

Then edit the Facts table and look at each of the steps.

On the Added Custom step click on the gear wheel icon to view the formula.

Congrats you know know how to get the duration in seconds !

 

Please click thumbs up and accept as solution button. Thank you. 

 

speedramps_2-1656534908823.png

 

 

 

Thank you.

I helped you, now plese help me with kudo.

Please click the thumbs up   AND   accept as solution buttons.

Thnak you !

 

Thanks. Please click the thumbs up and accept as solution.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.