Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to find the number of clients split by category from the intersection of both selections.
The total number of clients that bought in 2017 and 2018 is 3, which is correct, clients: a, b and d.
The count of clients by category is not correct because client d did not buy anything in category z in 2017, just in 2018.
Split by category should be:
t= 2 clients ( a and b both bought in category t in 2017 and 2018)
z= 1 client ( only client a bought in category z in both 2017 and 2018)
Any thoughts how i can achieve the expected result?
To accomplish this, I would suggest you to create a new field in the script like this
LOAD Client,
Category,
Client&Category as Client_Category
....
FROM ....;
and not use Client_Category instead of Client in your set analysis
Count(DISTINCT {<Client_Category = p({2018})*p({2017})>} Client_Category)
To accomplish this, I would suggest you to create a new field in the script like this
LOAD Client,
Category,
Client&Category as Client_Category
....
FROM ....;
and not use Client_Category instead of Client in your set analysis
Count(DISTINCT {<Client_Category = p({2018})*p({2017})>} Client_Category)
For Like for Like comparisons i would suggest you opt for creating flags
Like For Like (Comparative) Sales Analysis (Flag Method)
Like For Like (Comparable) Sales Analysis