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
jontas7
New Member

Multi Level BOM

Hi,

I've tried to browse the forums to find a suitable solution for my challenge but I do not seem to find what I am looking for.
So I decided to try to explain my challange the see if someone could help me.

I have a BOM-File which is roughly 97 000 rows.
This file holds key information such as
Item Number = Top Item
BOM Id = Unique Number for the BOM
BOM Item Number = Component Item Number

Then of course a bunch of other fields which might be relevant, and it might not.
My challenge is that my BOM Item Number could be present in the Item Number column as well, then holding a few BOM Item Numbers in the BOM ID for that specific Item.
Then this loop could go on for as much as 60 levels down in a structure.

When I try to do this on my own I always end up with having an error message telling me that: "The value xxx has multiple values"
Is someone willing to help me with this task or guide me how to achieve this?
Here is a picture of the database inserted in excel. Please let me know if further information is needed to help.

picture1.png

Thanks in advance!

2 REPLIES 2
ImkeF
Community Champion
Community Champion

You can try this: http://www.thebiccountant.com/2017/05/08/dynamic-bill-of-material-bom-solution-in-excel-and-powerbi/

 or this: http://www.thebiccountant.com/2017/02/14/dynamically-flatten-parent-child-hierarchies-in-dax-and-pow...

 

Both methods will work with items with multiple parents. But I've never used it on so many levels, so you might run into performance issues here.

 

Imke Feldmann

www.TheBIccountant.com -- How to integrate M-code into your solution  -- Check out more PBI- learning resources here

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thank you, however I have tried this and my only result is the following error message:

"An error occurred in the ‘’ query. Expression.Error: There weren't enough elements in the enumeration to complete the operation.
Details:
List"

 

Any idea how to proceed from here?

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.