Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Filters

KMI1
5 - Atom

I am trying to write a formula that excludes all accounts in a column except for 50100 series,50200 series,50300 series,51100 series,50400 series 53000 series and account 58910.  I am trying to use If or statements but need help with the right context.

 

Thanks.

 

Account Filter.JPG

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @KMI1, if the [Account] field is numeric then you can use the following:

 

[Account] IN (50100,50200,50300,51100,50400,53000,58910)

 

 

 

If it's a string, you'll need to wrap the values in quotes like so:

 

[Account] IN ('50100','50200','50300','51100','50400','53000','58910')

 

 

 

Stick this in the custom expression editor of a Filter tool and the records you're looking for will come out of the top (True) anchor.

 

Edit: By series, do you mean - for example - the 53000 series could be any number of 530xx? I.e. 53017? If so, I'd opt for something like this instead, assuming the field is numeric:

 

Left(ToString([Account]),3) IN ('501','502','503','511','504','530')
or
ToString([Account]) = '58910'

 

 

If the field is already a string:

 

Left([Account],3) IN ('501','502','503','511','504','530')
or
[Account] = '58910'

 

KMI1
5 - Atom

Thank you!!!

Labels