Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

Try this

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

devarasu07
Master II
Master II

Hi,

Try like this

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


devarasu07
Master II
Master II

both of us replied in same time

Not applicable
Author

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

devarasu07
Master II
Master II

Hi,

Try like this calculated dimension,

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

Not applicable
Author

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

devarasu07
Master II
Master II

Hi,

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

what is expected output screen shot? tks

sunny_talwar

Are you trying to create Buckets

Not applicable
Author

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?