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