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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Matrix is not adding up values correctly

So I have a parent-child hierarchy represented as a matrix. It works fine when it is fully expanded (i.e. the right account id corresponds to the right account balance) as seen below. And the current balance adds up correctly, so sum(yellow)=sum(green)=sum(blue)=sum(pink)=grey

8.PNG

 

But when I collapse the list into level 1, all of the values are added up. This makes the current balance wrong, because the value already represents the sum of the child accounts. So for example, for account 3-000 the amount should be 100,000 the same as in the above picture, not 380,000.

9.PNG

 I want the balance for each account to stay with their account number, and not add on the child accounts. I want the matrix to look like this:

10.PNG

 

Any help would be greatly appreciated!!

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous so you don't want each level to rolling up to the higher level, just use the value whatever it is at that level, correct?

 

if that is the case, just add a measure with MAX and that should do it and use this measure in your visuals

 

Value = MAX ( Table[Current Balance] ) 

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous so you don't want each level to rolling up to the higher level, just use the value whatever it is at that level, correct?

 

if that is the case, just add a measure with MAX and that should do it and use this measure in your visuals

 

Value = MAX ( Table[Current Balance] ) 

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k 

 

I realized I have another issue because some numbers are negative. Since this measure gives me the max, it gives me zero instead of the smallest negative number for some accounts.

 

Do you know any way to fix this?

 

Thanks!

Anonymous
Not applicable

@parry2k 

 

This worked! Thank you so much!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.