Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I'm trying to look at our demand going forward and the current stock levels.
For example, if we in January have 20 in demand and 50 in stock, then nothing needs to go to step two (breakdown to components) and we would have 30 left in stock. If the demand is 40 in february, then the net need (to step 2) would be 10 (30 in stock - 40 in demand), and every month after that, the entire demand would go to step two.
Important: The table I am using in Power BI is crossjoined via formulas, thus I can't do anything in PowerQuery. (If I do the crossjoin in Powerquery, the size becomes larger than 2gb for some reason..)
See sample file here what I currently do in Excel:
I have tried this so far, but it basically just takes the demand - stock and doesn't consider if the stock was consumed previously.. (in this case I ignored the customer..)
RemainingDemand =
VAR CurrentMonth = Table[Month]
VAR CurrentProduct = Table[UnifiedItemNumber]
VAR PreviousStock =
CALCULATE (
SUM ( Table[Stock] ),
FILTER (
Table,
Table[UnifiedItemNumber] = CurrentProduct
&& Table[Month]= MAXX (
FILTER (
Table,
Table[UnifiedItemNumber] = CurrentProduct
&& Table[Month] < CurrentMonth
),
Table[Month]
)
)
)
VAR CurrentDemand = Table[Total]
RETURN
IF (
PreviousStock >= CurrentDemand,
0,
IF ( PreviousStock = 0, CurrentDemand, CurrentDemand - PreviousStock )
)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 51 | |
| 36 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 77 | |
| 41 | |
| 26 | |
| 26 |