Expansion of part/subpart "bill of material" list

Frequent Contributor

Attached an Excel file with the input and desired output. I suspect this would need a PowerQuery. (I would prefer not to use VBA since I have no knowledge of that). Many thanks in advance for any help provided.

 

Basically I have a Bill of Material list with 3 columns: Part, Subpart and "Qty of Subpart in Part". This is multiple level, so a Subpart in one row can come back as a Part in another row, and so on.

I need to expand that list so that all variations of relations are added (not only each time Part-Subpart, but also Part - SubSubPart, SubPart - SubSubSubPart, Part - SubSubSubPart etc.).

 

So from this:

bartvana_0-1669124282256.png

 

which can be graphically represented like this:

bartvana_1-1669124316629.png

 

I need to have an expanded version as output:

bartvana_2-1669124351240.png

(view incomplete)

 

I think the Excel file will make things clear.

 

P.S. This question starts from the same input as my question from last year "Parent-child flattening (multiple levels)" but needs a different output.

0 Replies