Alteryx: Filter is not working using “OR” statement.
Category:
Question ID: 109781
2
0

I am trying to use the Filter Tool and custom filter a column where it equals multiple values. I am using the following statement:

[Field 1] = ‘A’ or ‘B’ or ‘C’

In the true output of the filter tool I am only getting ‘A’ as a result.

How can I filter on multiple values?

Marked as spam
Posted by (Questions: 17, Answers: 0)
Asked on August 5, 2020 5:19 pm
690 views
Answers (1)
2
Private answer

This can be accomplished in a few different ways.

Option #1: Redefine the field after each 'OR' statement

[Field1] = 'A' or [Field1] = 'B' or [Field1] = 'C'

Option #2: Same as above but sub double pipes ('||') for 'OR'

[Field1] = 'A' || [Field1] = 'B' ||[Field1] = 'C'

Option #3: Use the 'IN' statement (most concise option):

[Field1] in ('A', 'B', 'C')

All of these methods will yield A, B, and C on the 'T' output.

Marked as spam
Posted by (Questions: 0, Answers: 17)
Answered on August 5, 2020 5:25 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top