Forum Discussion
Converting string ex. "117:50:00" into hours
Well. I have two collums with a start service and other with the date closed as pic below:
I inserted a new collumn with the code:
Hi adrianoramos520 ,
You could use "Split" feature to get total hours in query editor.
Here is my result and test file for your reference.
11 Replies
- v-eachen-msft
Community Support
Hi adrianoramos520 ,
You could use "Split" feature to get total hours in query editor.
Here is my result and test file for your reference.
- adrianoramos520New Member
Thanks for everyone that tried to help me. v-eachen-msft its worked fine for me, and now I can perform some measures.
Thank you so much.
- lbendlin
Super User
Have you tried this ?
([Resolvido] - [Criado em]) * 24- adrianoramos520New Member
Yeah but I got a negative number.... and I still can't convert it into hours. Take a look.
- lbendlin
Super User
Can you show the power query code and some data samples in a table?
- mahoneypat
Microsoft Employee
I see you are trying to solve this with a DAX column but why not do it in the query editor. Do you need the hh:mm:ss format? Or is that a step to get you toward total hours? If the latter, you can get the total hours between the two columns with Duration.TotalHours([Resolved] - [Created]). This will give total hours as a decimal number, which you can round to the nearest hour, if needed.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat