Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have number type column, i want to convert those numbers into duration format : 00:00:00. How to do that ? Thanks
In query editor, select the column and the right click on the column and select change type. then you can select duration from there. It can also be completed on the ribbon. You have to do this in query editor.
Proud to be a Super User!
What does 4356 represent? It looks like it is being evaluated as days. Also, how is it being calculated?
4356 is a number in that duration column. After apply for Duration from Change Data Type, it returns 4356,00:00:00
So is that seconds, minutes, days, etc.?
What is the value before you changed the data type to duration?
@dkay84_PowerBI like 4356, it is a number. I think I might need to do match to get hh:mm:ss
Haha I understand it is a number. What I'm asking is what is that number? Days? Seconds? In order to properly calculate duration we can do some simple math to transform it but if you don't know what the granularity is then you have bigger problems than the duration being inaccurate.
I am using Duration = FORMAT(Test[Duration_avg]/60, "hh:MM:SS"), will test if it works well.
My prediction is that you will get the time that corresponds with the fraction of your division:
You reallly need to go back and find out what your value represents, otherwise you are bound to create the most beautiful dashboards with highly unreliable information and you'll be in big trouble sooner or later.
Look at my first post on page 2: #duration(0,0,0,4356)
Unlike #date, #datetime and #datetimezone,
#duration allows individual elements (days, hours, minutes, seconds) to exceed the natural limits like <24 and <60.
You can even have a mix of positive and negative arguments, e.g. #duration(0,0,2,-90) gives 0.00:00:30 (2 minutes minus 90 seconds).
Thanks all, I have the right numbers by using the DAX in this post
https://community.powerbi.com/t5/Developer/formatting-time-value-to-hh-mm-ss/td-p/85249
And next question :
How to get the average of duration
For example :
0.0275 |
0:42:34 |
1:05:30 |
1:10:16 |
I want to get the average duration of above 4 durations in the table.
@MarcelBeug you are right. i know couples of way to get "hh:mm:ss". I need to go back to understand the data better first, and make sure to come up the reliable numbers.
4356 days, 4356 hours, 4356 minutes, 4356 seconds:
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |