Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help getting a count of unique items sold by year

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

10 Replies
uacg0009
Partner - Specialist
Partner - Specialist

Hi Teresa,

If you want to make it in the front-end, you can do it like this:

Help getting a count of unique items sold by year.PNG

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