The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
18 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
13 | |
12 | |
9 | |
8 |