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.
Hi, I am trying to create a measure summarizing the effort hours (a decimal type) per date (a day) for a given task (a string type)
I have the table tblTasks containing the taskID, taskName, taskEffortHours, and the second table called tblCalendar containing calendarID, taskID, calendarDate. The tables are joined on taskID collumn.
If I create a card in Power BI with Sum of taskEffortHours and using a date slider where I select the days, but the card is not displaying the sum correctly, it just sumarrizes the taskName names but not the days. That's why I need this measure that will calculate the effortHours per tasks and per days.
Please help with this, I spent days trying to figure out this measure.
Many thanks!
Solved! Go to Solution.
Hello @gabitu,
You can use the SUMX function in DAX along with FILTER to iterate through the tblCalendar table and calculate the sum of effort hours for each day and task combination.
Effort Hours Per Task Per Day =
SUMX(
VALUES(tblCalendar[calendarDate]),
CALCULATE(
SUM(tblTasks[taskEffortHours]),
FILTER(
tblCalendar,
tblCalendar[calendarDate] = EARLIER(tblCalendar[calendarDate])
)
)
)
Should you require further assistance please do not hesitate to reach out to me.
Thank you Sahir, this works as charm!
Hello @gabitu,
You can use the SUMX function in DAX along with FILTER to iterate through the tblCalendar table and calculate the sum of effort hours for each day and task combination.
Effort Hours Per Task Per Day =
SUMX(
VALUES(tblCalendar[calendarDate]),
CALCULATE(
SUM(tblTasks[taskEffortHours]),
FILTER(
tblCalendar,
tblCalendar[calendarDate] = EARLIER(tblCalendar[calendarDate])
)
)
)
Should you require further assistance please do not hesitate to reach out to me.
Thank you Sahir, works as charm!
Thanks you very much Sahir, I will try!
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 |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |