Forum Discussion

bmilheim's avatar
bmilheim
Regular Visitor
4 years ago
Solved

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.  

 

 

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

     

     

     

     

8 Replies

  • 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 !

     

     

    • bmilheim's avatar
      bmilheim
      Regular Visitor

      My bad, I should have thought of that

       

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

       

      • speedramps's avatar
        speedramps
        Super User

        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 !