Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data like the below in which i want to create a chart that will show me how many distinct items sold per customer name. So in the example below, Customer ABC sold 2 distinct items. Once that is done, i want to show how many customers sold 1 unique item, how many customers sold 2 unique items and how many customers sold 3 or more unique items.
How would I accomplish this.
Year Customer Name Item sold
2014 abc AA
2014 abc BB
2014 abc BB
2014 def AA
2014 ghi CC
2014 ghi AA
2014 ghi BB
2014 jkl AA
2014 mno BB
2014 mno CC
2014 mno AA
Customers who sold 1 unique item = 2
Customers who sold 2 unique items = 1
Customers who sold 3 or more unique items = 2
Hi Teresa,
If you want to make it in the front-end, you can do it like this:
But if your data is too large, the aggr() function maybe takes too long time to calculate it, you can try it.
Thanks.
Aiolos Zhao