Alteryx Designer Desktop Discussions

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

Filtering Gl Account

SH_94
11 - Bolide

Dear Community,

 

I would like to ask how can we filter those 17 and 18 series for the following data below.

Data

1. 128902

2. 1829292

3. 178171722

4. 16eue

5. 18722h2

 

Results wanted

1. 1829292

2. 178171722

3. 18722h2

 

Many thanks in advance

 

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @SH_94 

 

Filter formula would be

 

 

Contains([Data],"17") or Contains([Data],"18")

 

 

Workflow:

atcodedog05_0-1628262881545.png

 

Hope this helps : )

 

Maskell_Rascal
13 - Pulsar

Use the custom filter option in the Filter Tool with the following formula. 

StartsWith([Data], "17") || StartsWith([Data], "18")

 

Maskell_Rascal
13 - Pulsar

I should point out that you could also potentially use this formula:

 

Contains([Data], "17") || Contains([Data], "18")

 

 

But based on your example, it appeared that you were trying to find values that started with either 17 or 18. If you use the Contains function, it would filter to any records that had those numbers in it. So like, 1917ABC would come back as a result. 

atcodedog05
22 - Nova
22 - Nova

Hi @Maskell_Rascal 

 

Its been a long since i have seen people use || good to see you use it 🙂. For some reason i feel he is looking for Startswith() only😅

atcodedog05
22 - Nova
22 - Nova

Hi @SH_94 

 

Just to make it fun here is Regex method 🙂

 

Contains:

REGEX_Match([Data], ".*(:?17|18).*")

 

Startswith

REGEX_Match([Data], "(:?17|18).*")

 

Workflow:

atcodedog05_0-1628263542774.png

 

Hope this helps : )

 

Labels