Forum Discussion
Convert Text Time Duration
- 2 years ago
Try reading through this chapter on all the duration functions: https://learn.microsoft.com/en-us/powerquery-m/duration-functions.
I think you'll want to convert to duration from text first. Then parse out your hours, minutes, seconds and either aggregate them separately or convert them all into the same unit and then aggregate.
Have you tried using the Duration functions in Power Query?
I think I found it
Even if I choose minutes though, and then it generates a decimal number. Is there an easy way to convert that decimal number to display in the visual card something like 8:35 for 8 hours and 35 minutes? It seems like this decimal is always going to give me a decimal type visual. Which would work, but cosmetically the 8:35 would look better than 8.5x hours if that makes sense...
- CoreyP2 years agoSolution Sage
Yeah, so you will need the data type to be in a number format so you can create your aggregation measures. But then you can do some calculations and dynamic format string to put it back into the HH:MM:SS text format you're looking for.