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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.