Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I am trying to use my data in a Matrix table using a hierarchy. The data example below is how my data is formatted. I created 4 columns to split the different levels for the hierarchy and created an inscope measure to clean up the matrix table. The problem I am having is that in the matrix table, the children are being added up to the parent but the parent has it's own cost (the sum of the parent ends up doubling). Also, a few of the parents have their own cost with the child costs = 0. I need to be able to sum by Group (line item), but not have the children sum up to the parent.
Is there a way to do this in Power BI for a Matrix Table? I have included a mock dataset that is similar to how my data is formatted. I also have a mockup Power BI but wasn't sure where I can upload that for folks to access. Is there a specific site that is best to use to upload this?
| State | City | Group | Depth | Level | Cost | Quantity | 
| Washington | Spokane | Fruit | 1 | LVL.1 | 100 | 50 | 
| Washington | Tacoma | Fruit | 1 | LVL.1 | 150 | 75 | 
| California | Moreno Valley | Fruit | 1 | LVL.1 | 50 | 25 | 
| California | Napa | Fruit | 1 | LVL.1 | 75 | 50 | 
| Washington | Spokane | Oranges | 2 | LVL.1.1 | 50 | 25 | 
| Washington | Tacoma | Oranges | 2 | LVL.1.1 | 100 | 50 | 
| Washington | Spokane | CaraCara Oranges | 3 | LVL.1.1.1 | 30 | 15 | 
| Washington | Tacoma | CaraCara Oranges | 3 | LVL.1.1.1 | 40 | 20 | 
| Washington | Spokane | Naval Oranges | 3 | LVL.1.1.2 | 20 | 10 | 
| Washington | Tacoma | Naval Oranges | 3 | LVL.1.1.2 | 40 | 20 | 
| Washington | Spokane | Blood Orange | 3 | LVL.1.1.3 | 0 | 0 | 
| Washington | Tacoma | Blood Orange | 3 | LVL.1.1.3 | 20 | 10 | 
| Washington | Spokane | Apples | 2 | LVL.1.2 | 50 | 25 | 
| Washington | Tacoma | Apples | 2 | LVL.1.2 | 50 | 25 | 
| Washington | Spokane | Green apples | 3 | LVL.1.2.1 | 35 | 20 | 
| Washington | Tacoma | Green apples | 3 | LVL.1.2.1 | 25 | 10 | 
| Washington | Spokane | Granny Smith | 4 | LVL.1.2.1.1 | 35 | 20 | 
| Washington | Tacoma | Granny Smith | 4 | LVL.1.2.1.1 | 25 | 10 | 
| Washington | Spokane | Red apples | 3 | LVL.1.2.2 | 15 | 5 | 
| Washington | Tacoma | Red apples | 3 | LVL.1.2.2 | 25 | 15 | 
| Washington | Spokane | Fuji | 4 | LVL.1.2.2.1 | 5 | 2 | 
| Washington | Tacoma | Fuji | 4 | LVL.1.2.2.1 | 15 | 10 | 
| Washington | Spokane | Gala | 4 | LVL.1.2.2.2 | 10 | 3 | 
| Washington | Tacoma | Gala | 4 | LVL.1.2.2.2 | 10 | 5 | 
| California | Moreno Valley | Grapes | 2 | LVL.1.3 | 50 | 25 | 
| California | Napa | Grapes | 2 | LVL.1.3 | 75 | 50 | 
| California | Moreno Valley | Red Grapes | 3 | LVL.1.3.1 | 0 | 0 | 
| California | Napa | Red Grapes | 3 | LVL.1.3.1 | 50 | 25 | 
| California | Moreno Valley | Green Grapes | 3 | LVL.1.3.2 | 0 | 0 | 
| California | Napa | Green Grapes | 3 | LVL.1.3.2 | 25 | 25 | 
Hi @clarkbj71 ,
Sorry, I can't tell how your hierarchy was created from the sample data you provided. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your hierarchy and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.