Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I am attempting to convert this decimal column into an hours and minutes column.
My formula below works well, but creates the column as a text column not a number column.
I need to be able to sum these columns.
Thank you for your help!
Solved! Go to Solution.
Hi @dubya ,
I create a table as you mentioned.
Then I think you can change your DAX code, it will give you Date/Time type. You can change format as you like.
Column =
VAR _hrs =
QUOTIENT ( '12 1/2'[Average Adjusted Hours], 1 )
VAR _mins =
MOD ( '12 1/2'[Average Adjusted Hours] * 60, 60 )
RETURN
TIME ( _hrs, _mins, 0 )
Next I think you can create another calculated column.
Total Adjusted Hours =
VAR TotalMinutes =
SUMX ( '12 1/2', '12 1/2'[Column] * 60 )
VAR Hours =
QUOTIENT ( TotalMinutes, 60 )
VAR Minutes =
MOD ( TotalMinutes, 60 )
RETURN
TIME ( Hours, Minutes, 0 )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Easy enough,
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
If you want to be able to do math on these values then you need to keep them as is. The format can be applied at the last second (ie as a different measure) before your display the result.
Thank you,
Are you able to provide additional detail as to had to add the formula as a measure?
Hi @dubya ,
I create a table as you mentioned.
Then I think you can change your DAX code, it will give you Date/Time type. You can change format as you like.
Column =
VAR _hrs =
QUOTIENT ( '12 1/2'[Average Adjusted Hours], 1 )
VAR _mins =
MOD ( '12 1/2'[Average Adjusted Hours] * 60, 60 )
RETURN
TIME ( _hrs, _mins, 0 )
Next I think you can create another calculated column.
Total Adjusted Hours =
VAR TotalMinutes =
SUMX ( '12 1/2', '12 1/2'[Column] * 60 )
VAR Hours =
QUOTIENT ( TotalMinutes, 60 )
VAR Minutes =
MOD ( TotalMinutes, 60 )
RETURN
TIME ( Hours, Minutes, 0 )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |