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!
Solved! Go to Solution.
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
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)
Best,
Fernando Vizcaino
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?
Thank you this worked!
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
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?
I want filter multiple GL code what would be the formula
If it possible to use this in an if function?
[GL Code] in (1111,2222,3333,4444)