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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Junaid11
Helper V
Helper V

Count Product Created from Remaining Inventory

Hello,
I have a table which is below:

ProductRaw MaterialUnits Required to Create ProductAvailable Inventory
ABCA1456
ABCB222
ABCC1334
DEFD1

677
DEFE124
DEFF145

This table shows Raw material required to create each product. Units shows quantity of raw material required required to create specific product while inventory column shows inventory.
I want to calculate the total products that can be created based on available inventory. It would be kep in mind each product require different quantity of raw materiak for creation. My outcome would be a below picture

ProductCreated Products
ABC11
DEF24

Your help would be highly appreaciated.
Thank you

1 ACCEPTED SOLUTION
Nathaniel_C
Community Champion
Community Champion

Hi @Junaid11 ,
If I understand your request your outcome will be this:

Nathaniel_C_0-1689699320736.png

If you would please use this measure:

Number of Products Constrained = 

var _Product = MAX(Constraints[Product])

var _calc = CALCULATE(MIN(Constraints[Count per Raw Material]), FILTER(All(Constraints),Constraints[Product]=_Product))

Return _calc

After you create  a column in Power Query that adds a column which shows the maximum number of units that can be built after being constrained by the raw material input.  Classic economics!

Nathaniel_C_1-1689699693593.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel







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

Proud to be a Super User!




View solution in original post

1 REPLY 1
Nathaniel_C
Community Champion
Community Champion

Hi @Junaid11 ,
If I understand your request your outcome will be this:

Nathaniel_C_0-1689699320736.png

If you would please use this measure:

Number of Products Constrained = 

var _Product = MAX(Constraints[Product])

var _calc = CALCULATE(MIN(Constraints[Count per Raw Material]), FILTER(All(Constraints),Constraints[Product]=_Product))

Return _calc

After you create  a column in Power Query that adds a column which shows the maximum number of units that can be built after being constrained by the raw material input.  Classic economics!

Nathaniel_C_1-1689699693593.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel







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

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.