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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello community!
I am trying to get my around to following: I am required to provide my organization with a weekly overview of stock availabilities., which is bascially an extension of another thread i found on this forum: Click
In Excel, this is a two-step approach.
In Excel this would look like this.
In PowerBI I managed to solve for the expected inventory per week (measure 'Projected Inventory'). In addition, I created a Help Measure which is, in a not so smart way, checking for each balance in the consecutive weeks
VAR Stock =
CALCULATE (
MAX ( Stock[Item] ),
FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] <= MAX ( 'Date'[Date] ))
VAR Week1
CALCULATE (
SUM ( Verkoop[Aantal] ),
FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) + 7)
RETURN
SWITCH(TRUE(),
Stock + Week1 < 0, "Yes",
etc.,"No")
Using the below, I am fulfilling the conditions set out by 1 through 3 above.
Net availability =
SWITCH(TRUE(),
[Help Measure]="Yes",0,
[Projected Inventory] <= 0, 0,
[Projected Inventory]<[Ending Balance],[Projected Inventory],
[Ending Balance])
I am wondering how I can make this more efficient and for that I am requesting your help. I think that my help measure in particular can be programmed a lot better (resulting in the outcome highlighted below in excel).
Looking forward to hearing from you!
https://drive.google.com/file/d/19A6EFPtDiSwjkc_MieBzPR5SqCoAjG4-/view?usp=sharing
Please note that the data included differs from the excel screencap above. The idea is the same though
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
6 | |
4 | |
3 |