Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Matrix Aggregation Issue

I am having troubles getting my totals to add correctly in my matrix. Here are my DAX measures: 

Expected Hours = IF([WH Affected] = 0 && [Worked Hours] = 0,0, SUM(L_Date[Expected Hours Worked]) * DISTINCTCOUNTNOBLANK(L_EmailsAndNames[Person_ID])) 
WH Affected = SUM('Days Off Requested'[Work Hours affected])
Worked Hours = SUM(Hours[Hours])
 
While this works on an individual level, it does not work on a total level. For example, if someone doesn't start until after x-date, it is still adding expected hours into the final total - even if it shows 0 for that person's line. 
 
datauser23_0-1681141386164.png

 

Any help would be appreciated! Thanks! Here are the tables I'm using: Expected Hours Tables 

3 REPLIES 3
MohammadLoran25
Solution Sage
Solution Sage

Hi @Anonymous ,

If you provide us with a sample data it would be great, because I did not get exactly what you mentioned.

Btw, as it is about a total problem, you need to

 

1-Use SUMMARIZE Function and Put it in SUMX. Like:

SUMX (
    SUMMARIZE ( 'YourTable', 'YourTable'[Column1], 'YourTable'[Column2],... ),
    [YourMeasure]
)

 

If this solves your question, Please give it a thumbs up and accept it as a solution to make it easier for the others to find what they are looking for.

 

Regards,

Loran

 

Anonymous
Not applicable

I added a link to my data tables in the original post. I tried your solution and got the below: 

datauser23_0-1681144798553.png

 

@Anonymous ,

Yes but that link does not contain all your tables to check your measures based on them.

How did you write the SUMX over SUMMARIZE? It should work.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.