Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
SDT
Creator
Creator

Histogram of # of customers with X orders

Hello, I have a table of orders with a customer identified for each order. Order numbers are unique. So the only two fields that matter for this purpose are OrderNumber and CustomerNumber.

I want to produce a histogram showing how many customers fall into bins of # of orders. For example, how many customers placed between 100 and 150 orders in a given time period. I understand how to do it in the load script if I build a new table. I want to be able to filter based on some of the other dimensions in the first table though.

This seems like it should be simple. I'm stuck. Maybe need to sleep on it.

Thank you in advance if anyone can help.

 

 

Labels (2)
1 Solution

Accepted Solutions
MarcoWedel

Try with a Bar chart having a dimension like

Aggr(Class(Count(Distinct OrderNumber),50),CustomerNumber)

 

and a measure expression like

Count(Distinct CustomerNumber)

 

View solution in original post

2 Replies
MarcoWedel

Try with a Bar chart having a dimension like

Aggr(Class(Count(Distinct OrderNumber),50),CustomerNumber)

 

and a measure expression like

Count(Distinct CustomerNumber)

 

SDT
Creator
Creator
Author

Thank you @MarcoWedel ! 

Worked perfectly.