Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to get a count of how many product variants are out of stock on a given week.
However, I only want to include variants that belong to a product that DOES have stock (in other variants) in the same week...
An example table would be..
I would expect the results to be..
Hope this makes sense. Any advice would be much appreciated!
Thanks
Darren
DIMENSION--
week
=IF(product='A' OR product='C' OR product='E',product)
stock
NOTE-- SELECT THE SECOND DIMENSION AND CHECK ON SUPRESS NULL VALUE
EXPRESSION--
if(stock=0, count(varient))
then output like this
week | PRODUCT | stock | varient |
1 | A | 0 | 3 |
2 | C | 0 | 1 |
3 | E | 0 | 1 |
SEE ATTACHEMENT
Hello,
This will only give me the count of variants each week.
What I need is the count of variants that have 0 stock, but belong to a product that DOES have stock (in other variants)...
Hope this is clear
Thank you!
try this
Aggr(count({$<Stock={'0'}>}Variant),Product)
or this
Aggr(Count( {$<Stock = E({$<Stock={'0'}>})>}Product),Product)
Thanks for your help.
It's getting close, but not quite worked how I wanted. I've attached the example. It gives me 2 in week 1, but this should be 3...? Any ideas..?
Thanks
Darren