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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Slipper
Frequent Visitor

Replacing certain BOM values with Sub-BOM values

Hello together,

 

I recently started to work more with BI using larger and more complex datasets and now I'm stuck at a problem with a Bill of material.

I have a huge BOM table with montly production volumes, this BOM table also includes a Sub BOM for a part of the inputs into the final product. 

One option I was thinking of was to split the main BOM into 2 tables by adding a second query and filter out the main BOM values Sub BOM values vice versa and then try to join both tables.

Ultimately I need a table where the sub BOM quantities have replaced the intermediate product quantity, so I know how much of which input ID quantity ended in which product type in this month, to know the correct input mix.

 

I was reading through possible approaches but the other BOM problems posted and hierarchy apporaches didn't really helped me.

I'm also unsure if the split in 2 tables is even necessary or if there is a smarter way to do this from the main table already including both datasets.

 

Appreciate any suggestions and help how to approach or solve this.

 

Thanks in advance!

 

Capture.PNG

 

Data example:

 

Main BOM

 

PeriodPlantProduct TypeInput IDVolume
01/01/2021FAX10
01/01/2021FA Y 120
01/01/2021FAZ 115
01/01/2021FBX5
01/01/2021FB Y 15
01/01/2021FBZ 15
01/01/2021FCX30
01/01/2021FCZ 110
01/01/2021FCZ 25
01/01/2021FDX40
01/01/2021FDZ 10
01/01/2021FDZ 20
01/01/2021GAX100
01/01/2021GAY 2250
01/01/2021GAZ 1300
01/02/2021FAX10
01/02/2021FA Y 15
01/02/2021FAZ 115
01/02/2021FBX5
01/02/2021FB Y 110
01/02/2021FBZ 15
01/02/2021FCX30
01/02/2021FCZ 110
01/02/2021FCZ 25
01/02/2021FDX40
01/02/2021FDZ 10
01/02/2021FDZ 20
01/02/2021GAX150
01/02/2021GAY 210
01/02/2021GAZ 1200

 

Sub BOM

 

PeriodPlantProduct IDInput IDVolume
01/01/2021FY 1Z 15
01/01/2021FY 1Z 25
01/01/2021FY 1Z 315
01/01/2021FY 3Z 10
01/01/2021FY 3Z 220
01/01/2021FY 3Z 30
01/01/2021GY 2Z 10
01/01/2021GY 2Z 2250
01/01/2021GY 2Z 30
01/02/2021FY 1Z 15
01/02/2021FY 1Z 25
01/02/2021FY 1Z 35
01/02/2021FY 3Z 10
01/02/2021FY 3Z 220
01/02/2021FY 3Z 30
01/02/2021GY 2Z 10
01/02/2021GY 2Z 210
01/02/2021GY 2Z 30
1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

@Slipper , you may want to merge BOM tables and replace relative rows,

Screenshot 2021-04-09 170803.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

@Slipper , you may want to merge BOM tables and replace relative rows,

Screenshot 2021-04-09 170803.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

@CNENFRNL 

Thanks a lot, that's exactly what I needed and it worked well with the original data!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.