Alteryx Designer Desktop Discussions

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

Errors when filtering on multiple strings

SandSlinky
7 - Meteor

Hello,

 

Forgive me, I am very new to Alteryx... But I have a large Excel file of data from Kickstarter projects and I only want to keep some of the product categories. The rest, I want to filter out. I was trying to use "Contains" in the Filter function to do this, but it gives me errors when I list multiple search terms, as you can see in the screenshot.

SandSlinky_0-1589895248408.png

I am also not sure what to do with the false entries then. Since I don't want to include them in the dataset, is there an easy way to just thro

5 REPLIES 5
jacob_kahn
12 - Quasar

@SandSlinky 

 

In Alteryx you have to format your filters a little differently when using OR/AND/etc.

 

Try doing something like this:

 

Contains([Field], "music") OR Contains([Field], "games") OR Contains([Field], "publishing") ..... etc.

 

If you are using the same field, you might want to consider using "AND" instead of "OR" 

 

Let me know if you need further help or assistance 🙂 

 

 

J

AbhilashR
15 - Aurora
15 - Aurora

Hi @SandSlinky, Welcome to the Alteryx Community! In addition to @jacob_kahn's suggestion, you could also use the IN function to set up your filter logic. 

Contains approach:

Contains([Category],"music") OR
Contains([Category],"games") OR
Contains([Category],"television") OR
Contains([Category],"film") OR
Contains([Category],"video")

IN approach:

[Category] IN ('music','games','television','film','VIDEO')

 

jacob_kahn
12 - Quasar

@AbhilashR Wow! I never knew of that function! That is amazing

Thank you!

SandSlinky
7 - Meteor

This worked, thanks so much!

SandSlinky
7 - Meteor

@

Labels