Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

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

Re: counting by range

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)

1 Reply

Re: counting by range

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)

Community Browser