# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

## More than and less than in a Filter

Hi,

I have been trying to put together a set analysis in a filter and got it to work on the basic level. i.e.

=[Shirt Orders]<=720  or

=[Shirt Orders]>1000

and the output in the filter drop down is -1 and 0 that is fine.

When I add more than or less than the functionality did not work.

=[Shirt Orders]>1000<=1200

I also tried

Count({<[Shirt Orders] = {">\$(1000)<=\$(1200)"}>} [Shirt Orders])

but it did not work.

Any help is appreciated.

Kurleigh

15 Replies
MVP

## Re: More than and less than in a Filter

Try this

Count({<[Shirt Orders] = {">1000<=1200"}>} [Shirt Orders])

Honored Contributor II

## Re: More than and less than in a Filter

Hi,

Try like this

Count({\$<[Shirt Orders] = {">1000<=1200"}>} [Shirt Orders])

Honored Contributor II

## Re: More than and less than in a Filter

both of us replied in same time

Not applicable

## Re: More than and less than in a Filter

Hi Sunny,

I forgot to add this is in a dimension.

I tried your solution but I am getting and 'Invalid Dimension" in my filter

Honored Contributor II

## Re: More than and less than in a Filter

Hi,

Try like this calculated dimension,

aggr(Count({\$<[Shirt Orders] = {">1000<=1200"}>} [Shirt Orders]),[Shirt Orders])

Not applicable

## Re: More than and less than in a Filter

Hi Devarasu,

Thanks for you help.

The aggregate is not giving me an invalid dimension but it is not exatcly what I am looking for. When I select the filter I should see and option that allows me to only show the Shirt Orders >1000 <=1200 or remove them.

e.g.

In one of my filters I have a set analysis of =[Shirt Orders]<=720

when I select the filter in should see -1 and 0.

-1 shows me all shirt orders between 1000 and 1200

0 removes all the shirts between 1000 and 1200

Hope this helps

Honored Contributor II

## Re: More than and less than in a Filter

Hi,

Can you share your sample data and your mock app. thanks

what is expected output screen shot? tks

MVP

## Re: More than and less than in a Filter

Are you trying to create Buckets

Not applicable

## Re: More than and less than in a Filter

Hi Sunny,

I was trying to do that but because I did not know what it was called and tried to find a way around it. If I use buckets and say:

if(count({\$<[Shirts]={"blue"},[shirt orders]={"<=700"}>}[shirt orders], 'Blue Shirt orders Less than 700', if(count({\$<[Shirts]={"red"},[shirt orders]={">200"}>}[shirt orders], 'Red shirt order above 200','All other Shirts'))

Is this correct?