Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In the report I'm building, I'm given a time duration in minutes. I want to convert it to days hours:minutes. (I don't care about seconds.)
Based on examples I saw here, I have teh following DAX forumula:
Solved! Go to Solution.
the close branket is in the wrong position. you can try to move it to the end.
VAR days = INT(Elapsed_Time /900 )
Proud to be a Super User!
Thank you all!!! I have it now.
Hi @KaiPonte
The following is a calculated column to do your conversion.
Fmt =
VAR _TotMin = [Minutes]
VAR _x1 = _TotMin / 1440
VAR _Days = INT( _x1 )
VAR _Remainder = _x1 - _Days
VAR _Hrs = INT( _Remainder * 24 )
VAR _Mins = _TotMin - ( ( _Days * 24 ) + _Hrs ) * 60
RETURN
_Days & " d " & _Hrs & " h " & _Mins & " m"
I hope you are able to adapt this.
Formatting Time from Minutes.pbix
the close branket is in the wrong position. you can try to move it to the end.
VAR days = INT(Elapsed_Time /900 )
Proud to be a Super User!
That was perfect, thank you! I now have what I wanted in the report. You can see in the image that my time now is measured in days, hours, and minutes. That's perfect. (I don't need seconds.)
you are welcome
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
104 | |
87 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |