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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
BrianNeedsHelp
Resolver I
Resolver I

Summing Totals in Matrix Hierarchy

I have this simple measure to compute what we need each day for the days remaining in month to reach a goal of 50.  

Need Per Day=(50-[Gross Adds])/([DaysRemaining])

This works fine at the location level, which is the lowest level in the Matrix.  So the next hieararchy level in the matrix is the Sales Manager.  The Sales Manager totals are showing negative.  What I'm expecting is to have it sum all of the [Need Per Day] for each manager.  What am I missing here?  This makes no sense.  Thank you!   

1 ACCEPTED SOLUTION
MasonMA
Community Champion
Community Champion

@BrianNeedsHelp 

 

Hi, I think what happened is likely that Power BI creates a new filter context for all locations under that manager. It calculates:

`[Gross Adds]` = SUM of all locations' gross adds `[DaysRemaining]` = SUM of all locations' days remaining. And then does: (50 - total gross adds) / total days remaining.


You may consider using VALUES with Locations to have it return a single column, which also inherits Filter contexts from your matirx visual. Example DAX like below:

Measure =
SUMX(
VALUES('Table'[Location]),
(50 - [Gross Adds]) / [DaysRemaining]
)

 

 

 

 

 

View solution in original post

2 REPLIES 2
BrianNeedsHelp
Resolver I
Resolver I

That did the trick.  Thank you!  

MasonMA
Community Champion
Community Champion

@BrianNeedsHelp 

 

Hi, I think what happened is likely that Power BI creates a new filter context for all locations under that manager. It calculates:

`[Gross Adds]` = SUM of all locations' gross adds `[DaysRemaining]` = SUM of all locations' days remaining. And then does: (50 - total gross adds) / total days remaining.


You may consider using VALUES with Locations to have it return a single column, which also inherits Filter contexts from your matirx visual. Example DAX like below:

Measure =
SUMX(
VALUES('Table'[Location]),
(50 - [Gross Adds]) / [DaysRemaining]
)

 

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.