Forum Discussion
gusly
10 years agoHelper II
How do display duration properly?
I'm displaying durations in some of my charts. However, I haven't figured out how to do it in a proper way. Currently I'm using a column that represent minutes as a decimal number. Not optimal, si...
luigidlt
9 years agoRegular Visitor
Is there any way to make it work for durations lower than 3600. Otherwise I get 12hr in all durations.
Thanks
thehy
8 years agoNew Member
Hi,
There is a much easier way to do this without DAX or code; with the latest version of PowerBI Desktop at least.
1. Convert the column(s) to 'Duration'
2. This should give you the duration in the format dd.hh:mm:ss.ms
3. Use the edit query 'Extract' -> 'Between delimiters'
4. Enter '.' as the start delimiter and ':' as the end delimiter
5. For the start, scan 'From the end of the input' and skip 2 delimiters
6. For the end, scan 'From the start delimiter, toward the end of the input' and skip 1 delimiter
And that should do it. It works for less that 3600 secs as I have durations less than an hour and more than a day.