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
RappJ
Helper I
Helper I

Managing Parent Child data relationships help request

Good day all,

Attached is a set of sample data that included a raw data set and a desired data set. Any guidance on how to begin moving forward with this would be greatly appreciated. 

  • Child knows parent
  • Parent does NOT know child
  • Need to group all related generatiosn all the way to the parent level
  • Smaple dataset goes to grandchildren
  • Actual live data can be up to 12 generations deep so I am trying to figure out a way to name all the headers dynamically and null the values for any generations missing data. 

I thought about possibly grouping by the [used in material number] field then expanding the nested tables somehow, but I am currently lost.

 

Raw Data

DescMaterial NumberSerial NumberEquipment NumberUsed in Equipment NumberCurrent PointsPoint Limit
Parent9999991PARENT-9991nullnullnull
Child-18888882CHILD-8881PARENT-99911500025000
Grandchild-1A7777773GRANDCHILD-7771CHILD-888125006000
Grandchild-1B6666664GRANDCHILD-6661CHILD-888145006000
Grandchild-1C5555555GRANDCHILD-5551CHILD-888150006000
Child-24444446CHILD-4441PARENT-99911000015000
Grandchild-2A3333337GRANDCHILD-3331CHILD-444115002250
Grandchild-2B2222228GRANDCHILD-2221CHILD-444120002250
Grandchild-2C1111119GRANDCHILD-1111CHILD-444125002250
Parent999999A1APARENT-9991Anull  
Child-1888888A2ACHILD-8881APARENT-9991A1500025000
Grandchild-1A777777A3AGRANDCHILD-7771ACHILD-8881A25006000
Grandchild-1B666666A4AGRANDCHILD-6661ACHILD-8881A25006000
Grandchild-1C555555A5AGRANDCHILD-5551ACHILD-8881A50006000
Child-2444444A6ACHILD-4441APARENT-9991A1000015000
Grandchild-2A333333A7AGRANDCHILD-3331ACHILD-4441A15002250
Grandchild-2B222222A8AGRANDCHILD-2221ACHILD-4441A20002250
Grandchild-2C111111A9AGRANDCHILD-1111ACHILD-4441A25002250

 

Desired Formatted Data

DescMaterial NumberSerial NumberEquipment NumberUsed in Equipment NumberCurrent PointsPoint LimitChild-1 Equipment NumberChild-1 DescChild-1 Material NumberChild-1 Serial NumberChild-1 -Current PointsChild-1 Max PointsChild-2 Equipment NumberChild-2 DescChild-2 Material NumberChild-2 Serial NumberChild-2 -Current PointsChild-2 Max PointsGrandChild-1A DescGrandChild-1A Material NumberGrandChild-1A Serial NumberGrandChild-1A Equipment NumberGrandChild-1ACurrent PointsGrandChild-1A Point LimitGrandChild-1B DescGrandChild-1B Material NumberGrandChild-1B Serial NumberGrandChild-1B Equipment NumberGrandChild-1BCurrent PointsGrandChild-1B Point LimitGrandChild-1c DescGrandChild-1c Material NumberGrandChild-1c Serial NumberGrandChild-1c Equipment NumberGrandChild-1cCurrent PointsGrandChild-1c Point LimitGrandChild-2A DescGrandChild-2A Material NumberGrandChild-2A Serial NumberGrandChild-2A Equipment NumberGrandChild-2ACurrent PointsGrandChild-2A Point LimitGrandChild-2B DescGrandChild-2B Material NumberGrandChild-2B Serial NumberGrandChild-2B Equipment NumberGrandChild-2BCurrent PointsGrandChild-2B Point LimitGrandChild-2C DescGrandChild-2C Material NumberGrandChild-2C Serial NumberGrandChild-2C Equipment NumberGrandChild-2CCurrent PointsGrandChild-2C Point Limit
Parent9999991PARENT-9991null  CHILD-8881Child-188888821500025000CHILD-4441Child-244444461000015000Grandchild-1A7777773GRANDCHILD-777125006000Grandchild-1B6666664GRANDCHILD-666145006000Grandchild-1C5555555GRANDCHILD-555150006000Grandchild-2A3333337GRANDCHILD-333115002250Grandchild-2B2222228GRANDCHILD-222120002250Grandchild-2C1111119GRANDCHILD-111125002250
Parent999999A1APARENT-9991Anull  CHILD-8881AChild-1888888A2A1500025000CHILD-4441AChild-2444444A6A1000015000Grandchild-1A777777A3AGRANDCHILD-7771A25006000Grandchild-1B666666A4AGRANDCHILD-6661A25006000Grandchild-1C555555A5AGRANDCHILD-5551A50006000Grandchild-2A333333A7AGRANDCHILD-3331A15002250Grandchild-2B222222A8AGRANDCHILD-2221A20002250Grandchild-2C111111A9AGRANDCHILD-1111A25002250

 

 

Thank you for any assistance you may be able to provide.

Jason 

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @RappJ ,

 

Please see this recent post on a similar topic where I provide a couple of links for DAX/M solutions:

https://community.powerbi.com/t5/Power-Query/Iterative-Parts-List-How-to-generate-useful-hierarchies... 

 

The process you're looking for is 'flattening a hierarchy' and, as per my response there, this is potentially complex/time-consuming process, so you probably won't get a full, made-to-measure solution here I'm afraid.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @RappJ ,

 

Please see this recent post on a similar topic where I provide a couple of links for DAX/M solutions:

https://community.powerbi.com/t5/Power-Query/Iterative-Parts-List-How-to-generate-useful-hierarchies... 

 

The process you're looking for is 'flattening a hierarchy' and, as per my response there, this is potentially complex/time-consuming process, so you probably won't get a full, made-to-measure solution here I'm afraid.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you. The PATH option worked. 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors