Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please help.....
I want to calculate how many products bought return customers from last year in this year, regardless SALES_AGENT.
Should be 7 products... I can't figure out how to use SET analysis 😞
CUSTOMER_ID | PRODUCT | QUARTER | YEAR | SALES_AGENT |
1 | FRUIT | Q2 | 2015 | JOHN |
2 | BEER | Q2 | 2015 | JOHN |
3 | BREAD | Q2 | 2015 | JOHN |
4 | EGGS | Q2 | 2015 | JOHN |
5 | PAPER | Q2 | 2015 | JOHN |
1 | BEER | Q2 | 2015 | JOHN |
1 | EGGS | Q2 | 2015 | JOHN |
2 | EGGS | Q2 | 2015 | JOHN |
4 | FRUIT | Q2 | 2015 | JOHN |
1 | FRUIT | Q2 | 2016 | JOHN |
1 | BEER | Q2 | 2016 | JOHN |
1 | EGGS | Q2 | 2016 | JOHN |
2 | BEER | Q2 | 2016 | GEORGE |
4 | EGGS | Q2 | 2016 | WILLY |
4 | FRUIT | Q2 | 2016 | WILLY |
4 | BREAD | Q2 | 2016 | WILLY |
6 | BREAD | Q2 | 2016 | MARTHA |
6 | EGGS | Q2 | 2016 | MARTHA |
7 | BEER | Q2 | 2016 | JANE |
7 | PAPER | Q2 | 2016 | JANE |
Thanks!
Maybe this?
count({<CUSTOMER_ID=P({1<YEAR={2015}>})>} PRODUCT)
Hi John,
thanks for the answer. It gives me the correct result.
I also try:
=Count({<YEAR = {'2016'},
CUSTOMER_ID={"=COUNT({<YEAR = {'2015'}>}PRODUCT)>0"}
>} PRODUCT)
which is also one of the solutions.