Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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
User | Count |
---|---|
12 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
11 | |
7 |