Forum Discussion
How do display duration properly?
Is there any way to make it work for durations lower than 3600. Otherwise I get 12hr in all durations.
Thanks
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.
- Psimon6 years agoRegular Visitor
now the column is transformed as text and not as a value!?
- kenwilsonii3 years agoFrequent Visitor
use duration.fromtext, There are built in functions to convert to Duration