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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.