Month / Year | Product | Sell |
---|
NOV 2016 | Cat | 10 |
DEC 2016 | Cat | 50 |
JAN 2017 | Cat | 70 |
Hello everyone, I have a scrip that calculates the avg of "Sell" for the last 3 months.
The result would be 43 for the product Cat.
tabel 2:
Month / Year | Product | Sell |
---|
NOV 2016 | Dog | 10 |
DEC 2016 | Dog | |
JAN 2017 | Dog | 50 |
However, should one of the sell fields be blank (because it was not reported), then I'd like the calculation to look at more months instead. So instead of using table 2, it should calculate on table 3. And result would be 115/5 = 23 (qlik ignores blank when avg obviously).
tabel 3:
Month / Year | Product | Sell |
---|
AUG 2016 | Dog | 10 |
SEP 2016 | Dog | 40 |
OCT 2016 | Dog | 5 |
NOV 2016 | Dog | 10 |
DEC 2016 | Dog | |
JAN 2017 | Dog | 50 |
Thanks in advance for the help!