I have a situation wherein I want to count the distinct customer.in a table with a condition per product. I want a summary count of distinct customers per product.
I created a parameter which shows what I want to be included and what should not be counted. The rules applied on the status are written below:
IF ATTR([Product]) = 'A' AND COUNT([Record]) >= 10 THEN 'Should be counted'
ELSEIF ATTR([Product]) = 'B' AND COUNT([Record]) >= 5 THEN 'Should be counted'
ELSEIF ATTR([Product]) = 'C' AND COUNT([Record]) >= 3 THEN 'Should be counted'
ELSE 'Should not be counted'
END
Since the data is transaction per row. Think of record as purchases. I am only interested in the right side of the crosstab CountD column. Please refer to the image below.
How can I achieve a summary using distinct customers per product considering only repeat purchases for product A >=10, product B>=5 and product C>=3.. If I remove the customer name everything will be aggregated and undesirable.
I want my output to be like the one below.
Any help will be so much appreciated. Can someone share/teach me the steps to achieve the kind of output that I desire.
Thank you in advance
Joseph