Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multiple values in Custom filter tool

sml1984
5 - Atom

I am not sure how to put this in the custom filter 

[CC]= "3430","3440","3820","382A","382S","3890","4070","407A","408A","4130","413A","4330","433A","4340","434A","434R","4481","4880"

 

I would like to include only these in the workflow . As we have different systems , instead of putting filter in each systems , after union i would like to put these as common filter .Also how many max values we can put in the custom filter .Pls help how this can be done in custom filter or is there any other ways to do this.

5 REPLIES 5
clmc9601
13 - Pulsar
13 - Pulsar

Hi @sml1984,

 

Do you mean you want to allow any of the following values to pass through your filter? If so, try this expression:

 

[CC] IN ("3430", "3440", "3820", "382A", "382S", "3890", "4070", "407A", "408A", "4130", "413A", "4330", "433A", "4340", "434A", "434R", "4481", "4880") 

 

IN is effectively an OR statement. There is no limit to the number of options (that I have experienced!) passed in the IN statement.

jportello
6 - Meteoroid

This works well when you put the exact value of the value you are wanting to filter...

 

But for example, 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. 

 

Is there an alternative way of writing the formula to filter on the values with out having to write the whole thing. I know there is also the option to write Contains ([Account], "1") OR Contains ([Account], "2") etc... but thats still alot of typing. 

clmc9601
13 - Pulsar
13 - Pulsar

Hi @jportello ,

 

How about this?

 

Left([Account], 1) IN ("1", "2", "3")

 

You can also use other string parsing functions like GetPart, Right, Substr, etc. Check out the functions page for more details!

cjaneczko
13 - Pulsar

Do you have these filter values in a list somewhere? Or are you just typing out what you want in the formula one by one?

apathetichell
18 - Pollux

regex_replace([Account],".*(\d+).*","$1")

 

@clmc9601 's way is easier - but wouldn't work if you have more than one digit potentially.

Labels