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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
drbr
Helper II
Helper II

2 measures for inventory qty of BOM item father and BOM item child

Can someone help with 2 measures? I guess the second measure would be just a slight modification of the first one...

 

Thank you!

Scenario:

mfBsKLU

1 ACCEPTED SOLUTION
drbr
Helper II
Helper II

@amitchandak I've managed to solve it. It came out pretty straightforward at the end. Thank you for your efforts.

 

Measures:

Inventory item @ItemBOM = IF(NOT ISEMPTY('Item BOM'),CALCULATE(SUM('Inventory today'[Qty]),REMOVEFILTERS('Item secondary')))

 

Inventory secondary item @ItemBOM = IF(NOT ISEMPTY('Item BOM'),CALCULATE(SUM('Inventory today'[Qty]),REMOVEFILTERS('Item')))

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@drbr , That is great. Kudos to you. Marking your reply as answer

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
drbr
Helper II
Helper II

@amitchandak I've managed to solve it. It came out pretty straightforward at the end. Thank you for your efforts.

 

Measures:

Inventory item @ItemBOM = IF(NOT ISEMPTY('Item BOM'),CALCULATE(SUM('Inventory today'[Qty]),REMOVEFILTERS('Item secondary')))

 

Inventory secondary item @ItemBOM = IF(NOT ISEMPTY('Item BOM'),CALCULATE(SUM('Inventory today'[Qty]),REMOVEFILTERS('Item')))

amitchandak
Super User
Super User

@drbr , I think secondary inventory Should be via BOM, this needs a little bit of modeling. Checking what best can be done

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@drbr , Can item and item secondary join to same item_id in inventory ?

How These measures are calculated.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi. Here is a link to a pbix file: https://fil.email/b8WyDoTX (valid for 7 days)

Thank you!

Comment: This is new file. Previous had one wrong relation!!!

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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