Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I need some help, I have data from a SQL that gives me total hours (up to 24), I have worked out some of hours by using measure,
Solved! Go to Solution.
Hi @micpete ,
One approach to do this is first converting everyting into minutes, then do the sum, then convert back into hours and minutes. Unfortunately working with durations in DAX is not as convenient as in PowerQuery.
Calcualted column:
TimeMinutes = [hours]*60+[minutes]
Measures:
TotalDuration = SUM(table[TimeMinutes])
TotalHours = INT(DIVIDE([TotalDuration],60))
TotalMinutes = [TotalDuration]-[TotalHours]*60
Kind regards,
Martin
Thank you @Martin_D for your prompt reply.
Hi @micpete ,
May I ask if you have tried the suggestions above? If the suggestion helped you, you might consider marking it as a solution. If the problem has not yet been solved, please feel free to ask us a question.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @micpete ,
One approach to do this is first converting everyting into minutes, then do the sum, then convert back into hours and minutes. Unfortunately working with durations in DAX is not as convenient as in PowerQuery.
Calcualted column:
TimeMinutes = [hours]*60+[minutes]
Measures:
TotalDuration = SUM(table[TimeMinutes])
TotalHours = INT(DIVIDE([TotalDuration],60))
TotalMinutes = [TotalDuration]-[TotalHours]*60
Kind regards,
Martin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
12 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
19 | |
14 | |
11 | |
10 | |
10 |