Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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

 

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.

 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:

 

Any help would be greatly appreciated!!

  • 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.

     

3 Replies

  • 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.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      parry2k 

       

      This worked! Thank you so much!!

    • Anonymous's avatar
      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!