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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
shakedb70
Frequent Visitor

sum up by hierarchy in a table and displaying it

Hi!

I have a table that looks like that:

shakedb70_1-1660041908442.png

where each name has a father (except for the ones at the first level) and only the names in the highest level has a total (the highest level doesn't habe to be 4).

I'm trying o sum up each name by it's sons total, so the final table should look like that:

shakedb70_2-1660042043839.png

in addition I want to show this table in the power bi in this format:

shakedb70_4-1660042300023.png

with an option to drill down and up.

Please if anyone can help, Im still new to power bi and learning on the way.

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @shakedb70 ,

in Power BI you can do this by using the PATH functions and displaying the hierarchy in a matrix.

SumUpHierarchy.png

First you determine all parent elements per level with PATH.

hierarchy path = PATH('Table'[Name],'Table'[father name])

Then you decompose the path with PATHITEM

hl1 = PATHITEM('Table'[hierarchy path],1)

SumUpHierarchy_dax.png

For more info check out the attached sample file.

 

There is also a DAX Pattern post on the topic:

https://www.daxpatterns.com/parent-child-hierarchies/

 

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

1 REPLY 1
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @shakedb70 ,

in Power BI you can do this by using the PATH functions and displaying the hierarchy in a matrix.

SumUpHierarchy.png

First you determine all parent elements per level with PATH.

hierarchy path = PATH('Table'[Name],'Table'[father name])

Then you decompose the path with PATHITEM

hl1 = PATHITEM('Table'[hierarchy path],1)

SumUpHierarchy_dax.png

For more info check out the attached sample file.

 

There is also a DAX Pattern post on the topic:

https://www.daxpatterns.com/parent-child-hierarchies/

 

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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