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.
Hi, what I want to do is add a colum wich gets me the amount of hours and minutes from and integer value. I have the integer value column.
say I have 100, so it would be 1:40 (hh:mm) or 2880 would be 48:00, NOT two days.
Any help would be great, thanks
Solved! Go to Solution.
Hi @Anonymous ,
If you want to do it by custom column in query editor, you can use the following codes:
Number.ToText(Number.IntegerDivide([Column1],60))&":"&Text.PadStart(Number.ToText([Column1]-Number.IntegerDivide([Column1],60)*60),2,"0")
Hello @Anonymous
This should work for you.
Hours Minutes = VAR Hours = INT ( DIVIDE ('Table'[Minutes], 60 ) ) VAR Minutes = FORMAT ( 'Table'[Minutes] - Hours * 60, "00" ) RETURN Hours & ":" & Minutes
How do I implement this as a Custom Column?
Hi @Anonymous ,
If you want to do it by custom column in query editor, you can use the following codes:
Number.ToText(Number.IntegerDivide([Column1],60))&":"&Text.PadStart(Number.ToText([Column1]-Number.IntegerDivide([Column1],60)*60),2,"0")
If you go to your table, under modeling you can add a new column then paste in the DAX. You just need to change the name of the table to be your table name.
Wrote an article on this long time ago with @konstantinos . https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
I think there is also something in the Quick Measures Gallery for this.
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |