Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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 )
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 33 | |
| 32 | |
| 32 |