This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello,
I have a table which is below:
| Product | Raw Material | Units Required to Create Product | Available Inventory |
| ABC | A | 1 | 456 |
| ABC | B | 2 | 22 |
| ABC | C | 1 | 334 |
| DEF | D | 1 | 677 |
| DEF | E | 1 | 24 |
| DEF | F | 1 | 45 |
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
| Product | Created Products |
| ABC | 11 |
| DEF | 24 |
Your help would be highly appreaciated.
Thank you
Solved! Go to Solution.
Hi @Junaid11 ,
If I understand your request your outcome will be this:
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!
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
Proud to be a Super User!
Hi @Junaid11 ,
If I understand your request your outcome will be this:
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!
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
Proud to be a Super User!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 20 | |
| 19 |