Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
srikantj
Creator
Creator

Limiting filter in multibox

Hi qlikss.

I have a field named    "quantity" and it has both negative and positive values and zeroes

quantity

-45

-54

0

45

98

I used it in my multibox. it is showing all 5 values

But i want only two options 1) <0   2) >=0     I want only these two options not all values

Based on this my chart should vary ... Suggest Qliksssss

1 Solution

Accepted Solutions
sunny_talwar

Use an if statement

If(quantity < 0, '<0', '>=0')

View solution in original post

4 Replies
sunny_talwar

Use an if statement

If(quantity < 0, '<0', '>=0')

bhupesh_gupta
Creator
Creator

Hi Srikanth

There are various ways of doing this.. A very basic one is to use IF ELSE statement in the precedence load,something like this,

load *,

if(quantity<0,'<0',if(quantity>=0,'>=0')) as TEST;

LOAD * INLINE [

quantity

-45

-54

0

45

98

];

Regards

Bhupesh

srikantj
Creator
Creator
Author

hi sunny ,

it is working fine .. still 10 to 15 negative values are coming for >=0

i am using Expression in straight table not field as filter

sunny_talwar

Can you share a sample where this is happening for you?