Alteryx Designer Desktop Discussions

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

Filtering multiple entries using one custom filter tool

Empire5790
5 - Atom

Hello,

 

I looked through the discussions to find my answer and what looked like it worked for other people is not working for me. I am trying to filter out multiple account IDs using one custom filter tool and the OR operator, but when I run the workflow it does not filter anything out. It also does not throw an error when running so I am not sure where exactly my issue is. Code for filter is below:

[Account ID] !=10681 OR 10781 OR 10662 OR 10782 OR 10801 OR 10657 OR 10562 OR 10554 OR 10687 OR 10688 OR 10700 OR 10737

 

I have tried to wrap the formula in parens but that did not change the outcome. My workaround which I have been using thus far is to add a new filter tool with each additional account ID as they come in. This has worked for me, but the list of IDs to filter out is growing and I don't want to have 50+ filter tools in a row for each ID. I'm sure it is something simple I am missing so thank you in advance for any help!

9 REPLIES 9
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Empire5790 ,

 

If Account ID is numeric, you are very close:

 

[Account ID] NOT IN (10681,10781,10662,10782,10801,10657,10562,10554,10687,10688,10700,10737)

Cheers,

 

Mark 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
fmvizcaino
17 - Castor
17 - Castor

Hi @Empire5790 ,

 

You can use the following function in filter tool.

[Account ID] not in (10681 , 10781 , 10662 , 10782 , 10801 , 10657 , 10562 , 10554 , 10687 , 10688 , 10700 , 10737)

 

fmvizcaino_0-1592320093004.png

 

 

Best,

Fernando Vizcaino

Empire5790
5 - Atom

Thank you for the reply, this formula worked for me! If I understand you correctly, this formula will only work if the data set is numeric? What would be the formula if the data was a string?

Empire5790
5 - Atom

Thank you this worked!

fmvizcaino
17 - Castor
17 - Castor

Hi @Empire5790 ,

 

If your data is a string, you only need to insert quotes or double quotes around each value.

[Account ID] not in ("10681" , "10781" , "10662")

 

Best,

Fernando Vizcaino

Mari1
6 - Meteoroid

Hi. My data is V_String, and some metrics in column [Account"] have already quotation marks on it as part of the metric name (i.e. "3653 O....."). If I were to filter using  [Account] IN ("3435 O...", "3457 O..", ""3653 O....."") and place quotation marks before the metric name, I end up using double quatation marks for those metrics, and get an error. If I only use them once, the metrics get excluded. How can I go around that?

Nilofar_Khan
5 - Atom

I want filter multiple GL code what would be the formula

Dallasblue
5 - Atom

If it possible to use this in an if function? 

sethuram85
5 - Atom

[GL Code] in (1111,2222,3333,4444)

Labels