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?
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.