Forum Discussion
SACooper
2 years agoHelper II
Week on Week Stock Comparrison problems.
I am looking to produce a week-on-week comparison of stock levels. We ideally take stock on the same day each week, but occasionally this gets pushed back a day or two and we just accept the variatio...
- 2 years ago
Eureaka!
solved it!//Orignal code to this point VAR lastweekstock = CALCULATE( SUM('Stock'[instock]), 'Stock'[Date created] >= lastweek. 'Stock'[Date created] < lastweek + 7, ALLEXCEPT('Stock', 'Stock'[StockItem]) ) //Original code from this point
SACooper
2 years agoHelper II
Eureaka!
solved it!
//Orignal code to this point
VAR lastweekstock =
CALCULATE(
SUM('Stock'[instock]),
'Stock'[Date created] >= lastweek.
'Stock'[Date created] < lastweek + 7,
ALLEXCEPT('Stock', 'Stock'[StockItem])
)
//Original code from this point