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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Condition (OR)

Hello,

I have an a chart with an expression that should be enabled depending on the selection of the user. I have created the condition but only the first part works and not the second (after the OR):

Condition:

Subfield(Variable1, '|',2) <> 'Apple' OR Subfield(Variable1, '|',6)<>'Clothes'

When I select "apple"  the column in the chart disappears but when I select "Clothes" it does not.

What am I doing wrong?

Thanks for your help

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

You perhaps need 'AND' rather than 'OR'.

Subfield(Variable1, '|',2) <> 'Apple' AND Subfield(Variable1, '|',6)<>'Clothes'

View solution in original post

3 Replies
its_anandrjs
Champion III
Champion III

Can you share sample file for the same also why subfield have 2 and 6 in the condition.

Subfield(Variable1, '|',2) <> 'Apple' OR Subfield(Variable1, '|',6)<>'Clothes'



Regards

Anand

tresB
Champion III
Champion III

You perhaps need 'AND' rather than 'OR'.

Subfield(Variable1, '|',2) <> 'Apple' AND Subfield(Variable1, '|',6)<>'Clothes'

Not applicable
Author

You are right.

I guess I was wrong in my assumption. Because by placing an "AND" I thought that in order to the expression  to be disable I would need to choose both Apple and Clothes, thats why I went for "OR". But with AND is work as expected. Thanks for the tip.