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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

OR logical function

Is there an equivelent to the OR logical function?

Im trying to load a flag as to whether or not one field is equal to any of 3 seperate values.

If(X = 'a' or 'b' or 'c',1,0)as Flag, returns true for every record including those that = d, e, f, etc.

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

did you try to repeat the field on the conditon?

If(X = 'a' or X = 'b' or X = 'c',1,0)as Flag

View solution in original post

3 Replies
erichshiino
Partner - Master
Partner - Master

did you try to repeat the field on the conditon?

If(X = 'a' or X = 'b' or X = 'c',1,0)as Flag

Anonymous
Not applicable
Author

thanks.

Anonymous
Not applicable
Author

Same thing, different approach, I prefer it as a more flexible:

if(match(X,'a','b','c'),1,0)