Alteryx Designer Desktop Discussions

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

Filter on Multiple Contains

yzhang316
8 - Asteroid

Hi,

 

I am trying to filter on 2 criteria using contains.  My customer filter's language is the following, but it is giving me errors.  How do I correct this error?

 

Contains([PA_SUPPLIER_NAME],"CCP") OR Contains([PA_SUPPLIER_NAME]),"WFP")

 

Thanks

 

 

5 REPLIES 5
patrick_digan
17 - Castor
17 - Castor

@yzhang316 It looks like you have an extra parens in your second statement. try this:

Contains([PA_SUPPLIER_NAME],"CCP") OR Contains([PA_SUPPLIER_NAME],"WFP")
yzhang316
8 - Asteroid

Facepalm...


Thank  you so much!

jellis
5 - Atom

Hello, I have a similar issues and can't seem to write it correctly. 

I need to do a sample excluding the following states. 

 

!Contains([Property State],"New York") OR
!Contains([Property State],"New Jersey") OR
!Contains([Property State],"Pennsylvania")

 

 

DavidLane
8 - Asteroid

I think you should be using AND instead of OR

 

!Contains([Property State],"New York") AND
!Contains([Property State],"New Jersey") AND
!Contains([Property State],"Pennsylvania")

jportello
6 - Meteoroid

Say I want to filter on data that has values like " 1 - Asset" "2 - Liability" "3 - Equity" but I dont want to have to write out : [Account] IN ( " 1 - Asset", "2 - Liability", "3 - Equity")  and I just want to be able to write: [Account] IN ("1", "2", "3").... that doesnt work because there is no value with just the "1".  I have to write out the exact value. 

 

I know there is also the option to write Contains ([Account], "1") OR Contains ([Account], "2") etc... but thats still alot of typing. 

Labels