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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.