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
Iamnvt
Continued Contributor
Continued Contributor

BOM Modeling

hi,

 

I have 3 tables:

1. Product Master data as dimension table for all material code

2. BOM: 1 Material contains many child components

3. Sales Order table: as fact table for orders of each parent material codes

 

--> what is the approach for calculating child components requirement from the Sales orders?

 

Material requirement of Purchased Item  = Requested Quantity (from Sales orders) x Usage (from BOM table)

 

Thanks,

 

Capture.PNG

 

1 ACCEPTED SOLUTION
Iamnvt
Continued Contributor
Continued Contributor

hi,

 

I found the solution through Many to Many relationship topic.

 

https://exceleratorbi.com.au/many-many-relationships-dax-explained/#comment-23150

 

thanks for helping anyway.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

 

@Iamnvt,

Please create a measure in the BOMReport table using DAX below.

Material requirement of Purchased Item  = SUM ( 'BOMReport'[Usage] ) * SUMX ( RELATEDTABLE (OB), OB[Requested Quantity] )  )

And you can review the example in my environment.

Measure = SUM ( 'product'[price] ) * SUMX ( RELATEDTABLE ( sales ), sales[amount] )  )
1.JPG2.JPG

However, if you don't get expeted result using the above DAX, please share sample data of your tables. Do mask sensitive data before uploading sample data.

Regards,
Lydia

Iamnvt
Continued Contributor
Continued Contributor

hi,

 

thanks for your answer. It seems not working.

I attached a sample with the expected result. This can be done through merge function in PQ, however, I don't want to flatten the material requirement in BOM table.

 

https://1drv.ms/x/s!Aps8poidQa5zku5ZWW9lT_x6em_EZA

 

 

Just want to find a DAX solution to calculate the component requirements.

 

 

Thanks again,

Anonymous
Not applicable

@Iamnvt,

Create a new table using DAX below.

Table = GENERATEALL(BOM,var productid =BOM[Product] return SELECTCOLUMNS(CALCULATETABLE(Sales,Sales[Product]=productid),"sales",Sales[Sales]))


Then create a table  visual as follows.
1.JPG



Regards,
Lydia

Iamnvt
Continued Contributor
Continued Contributor

hi,

 

I found the solution through Many to Many relationship topic.

 

https://exceleratorbi.com.au/many-many-relationships-dax-explained/#comment-23150

 

thanks for helping anyway.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.