Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

counting by range

I'm trying to create a table in qlik sense which shows sales range and # of customers in each range:

111.PNG

How can I create sales range in table? What will the function for counting customers be like?

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

May be try to create buckets here like this

Dimension

Aggr(If(Sum(Sales) > 100 and Sum(Sales) <= 200, Dual('100-200', 1),

         If(Sum(Sales) > 200 and Sum(Sales) <= 300, Dual('201-300', 2),

         If(Sum(Sales) > 300 and Sum(Sales) <= 400, Dual('301-400', 3), Dual('401+', 4)))), Customer)

Expression

Count(DISTINCT Customer)

View solution in original post

1 Reply
sunny_talwar

May be try to create buckets here like this

Dimension

Aggr(If(Sum(Sales) > 100 and Sum(Sales) <= 200, Dual('100-200', 1),

         If(Sum(Sales) > 200 and Sum(Sales) <= 300, Dual('201-300', 2),

         If(Sum(Sales) > 300 and Sum(Sales) <= 400, Dual('301-400', 3), Dual('401+', 4)))), Customer)

Expression

Count(DISTINCT Customer)