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
pcowman1
Helper I
Helper I

Creating BOM Availability

I'm trying to make a report for whether you can make a master part number or not, and then which sub-assemblies can be used. I'm connecting to a Business Central DB but that part doesn't really matter when you get to PBI.

 

Here's a sample of what the data looks like:Item Sample.JPG

Part 1 can't be made because it has shortage in inventory 

Item 2 can be made but has a bottle neck on Category 4.

 

The biggest part is - What is available to be made or not made.

 

Can this be done with a measure/filter? I'm not good with filters yet.

1 ACCEPTED SOLUTION

Hello,

 

Create these calculated columns:

Inventory Per Category  Per Item = 
CALCULATE (
    SUM ( 'Table'[Inventory] ),
    ALLEXCEPT ( 'Table', 'Table'[Common Item Number], 'Table'[Item_Category_Code] )
)
Min Inventory in All Categories Per Item = 
CALCULATE (
    MIN ( 'Table'[Inventory Per Category] ),
    ALLEXCEPT ( 'Table', 'Table'[Common Item Number] )
)
BOM = 
//returns true if [Inventory Per Category] =  [Min Inventory in All Categories Per Item]
'Table'[Inventory Per Category] = 'Table'[Min Inventory in All Categories Per Item]

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

8 REPLIES 8
danextian
Super User
Super User

Hi @pcowman1 

Assuming that whether an item can be done is based on sum of shortage per unique Common Item Numer and Part Number, create a calculated column similar to below:

Item Part Can Be Done =
IF (
    CALCULATE (
        SUM ( Table[Shortage] ),
        ALLEXCEPT ( Table, 'Table'[Part Number], 'Table'[Common Item Number] )
    ) > 0,
    "No",
    "Yes"
)

Or if it is based solely on Common Item Number:

Item Can Be Done =
IF (
    CALCULATE (
        SUM ( Table[Shortage] ),
        ALLEXCEPT ( Table, 'Table'[Common Item Number] )
    ) > 0,
    "No",
    "Yes"
)

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I'm trying for the second  - I got No on both

Can you please post a sample data (not an image) and then your exact conditions/criteria (what can be made and based on what)? Excel formula coud also be helpful.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Say I'm making these two parts - Item 1 has a bottle neck at Category 1 because there are only 2.

Item 2 has a bottle neck at Category 2 because there are only 20 and the rest of the categories are larger.

Common Item NumberItem_Category_CodePart NumberInventory
Item 1Category 1Part 12
Item 1Category 2Part 25
Item 1Category 3Part 315
Item 1Category 3Part 431
Item 1Category 3Part 559
Item 1Category 5Part 663
Item 1Category 6Part 7168
Item 1Category 4Part 8254
Item 1Category 3Part 9398
Item 1Category 3Part 10647
Item 1Category 5Part 11725
Item 1Category 3Part 122000
Item 2Category 1Part 1350
Item 2Category 2Part 1420
Item 2Category 4Part 158
Item 2Category 3Part 1615
Item 2Category 4Part 1725
Item 2Category 3Part 1831
Item 2Category 5Part 1963
Item 2Category 4Part 20127
Item 2Category 6Part 21168
Item 2Category 3Part 22398
Item 2Category 3Part 23647
Item 2Category 5Part 24725
Item 2Category 3Part 252000

So the end result would look like this:

Common Item NumberItem_Category_CodeInventory
Item 1Category 12
Item 2Category 220

I'm going to add to this (and I really think this should be simple and don't know why I'm having a hard time):

 

if (sum(Inventory in Category) = min(sum(inventory in Category of all category sums))

 

Is that clearer? Am i making it worse?

Hello,

 

Create these calculated columns:

Inventory Per Category  Per Item = 
CALCULATE (
    SUM ( 'Table'[Inventory] ),
    ALLEXCEPT ( 'Table', 'Table'[Common Item Number], 'Table'[Item_Category_Code] )
)
Min Inventory in All Categories Per Item = 
CALCULATE (
    MIN ( 'Table'[Inventory Per Category] ),
    ALLEXCEPT ( 'Table', 'Table'[Common Item Number] )
)
BOM = 
//returns true if [Inventory Per Category] =  [Min Inventory in All Categories Per Item]
'Table'[Inventory Per Category] = 'Table'[Min Inventory in All Categories Per Item]

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you! It's late here and I've been working since early but it looks perfect! Many thanks. If I ever see you, I owe you a drink.

I'm seriously considering moving the whole thing to excel because I need to pivot a table and join it to another table. Might easier in excel where I can do vlookup on the columns but I'm really not that great with vlookup in excel either. I need to up my game in this area. 

 

I fixed the first one by doing a second table that uses the common number and bom number and then does a calculated column filtering. 

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.