Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filter using OR

raddi
6 - Meteoroid
I am trying to select only those records that have a certain attribute. As long as the record has one of multiple forms of this attribute, it should be included, otherwise it should be excluded. The attribute is Int. My condition on the filter looks something like this:

(field name)==xxx||yyy||zzz

This isn't working. It is returning all records in teh true stream and none in the false stream.
8 REPLIES 8
Ned
Alteryx Alumni (Retired)
You can use a IN statement:

[Field1] IN (5,6,8)

That does exactly what you are asking for.  
Ned
Alteryx Alumni (Retired)
And just to add 1 more detail:  If you want to use the || or OR syntax (OR and || are synonyms) , you need to specifiy the field name multiple times:

[field]==a OR [field]==b OR ...
SeanAdams
17 - Castor
17 - Castor

Hey @raddi

 

Are you OK to mark @Ned 's solution as 'Solved"?   That way, this can contribute to the body of knowledge that folks can search for worked solutions.

 

Community Admins - if @raddi is not able to get to this in a week or two - would you mind marking this as solved?

 

Thank you

Sean

ckirgiz
7 - Meteor

Is this still applicable? I tried both solutions but it did not work. 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @ckirgiz!

 

Try:

[Field1] IN ("xxx","yyy","zzz")

 

I also attached sample workflow. Please let us know if this works for you.

ckirgiz
7 - Meteor

Thank you so much @ddiesel! It worked very well.

ddiesel
13 - Pulsar
13 - Pulsar

You're welcome! Glad it worked for you!

Sayeed1
7 - Meteor

Thank you

Labels