Free Trial

Alteryx Designer Desktop Discussions

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

How can I filter the word that start with certain number or alphabet?

kds825
5 - Atom

Hi,

As I wrote in the subject, how can I filter the word that starts with "certain number or alphabet"?

 

For example, I want to filter the account number that starts with "3" ( 3101, 3102 3103)

 

Account No
3101
3102
3103
4204
4205
4206
4207
7 REPLIES 7
MarqueeCrew
20 - Arcturus
20 - Arcturus

@kds825 ,

 

 did you try Startswith(). ?

 

StartsWith

StartsWith(String, Target, CaseInsensitive=1): Checks if a string starts with a particular string. Returns True if String starts with a particular string Target, else returns False.

Example

StartsWith('ABC123', 'ABC') returns True.

StartsWith('ABC123', 'abc') returns True.

StartsWith('ABC123', 'abc', 0)returns False.

 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
sparksun
11 - Bolide

Yes,Startswith function will do it

sparksun_0-1658284914908.png

 

Qiu
21 - Polaris
21 - Polaris

@kds825 
We can use the Startwith function or use the left function with length =1 😊

0720-kds825-1.PNG0720-kds825-2.PNG

kds825
5 - Atom

Hi

@Sparksun @Qiu

 

Thanks for your help. 

I just wonder why this function is not working.

 

left([Account No], 1) = 3

 

Because does the function "left" only work for the String?

vpogaku
6 - Meteoroid

Hi Qui,

 

What if I have to filer multiple values starting with different numbers and alphabets?

 

StartsWith(ToString([policy_number]),'5','8','9','X') - This is not working.

 

AccountNo

-------------

25565666

16756756

35435436

64543543

67657567

89766666

56767688

96757655

X6547777

A5477675

 

OUTPUT: 

-----------

56767688

89766666

96757655

X6547777

 

 

Thanks 

VJ

sparksun
11 - Bolide

REGEX_Match([AccountNo],"[589x]\d+")

 

1.jpg

vpogaku
6 - Meteoroid

Thank you.

Labels
Top Solution Authors