I have a feeling this is very simple, but as someone who is new to Alteryx I am struggling to find a solution:
I have a Field, "Zip Code", which is full of freeform user input data, which means that anything and everything could be input - all I am trying to do is use a formula to say 'If [ZipCode] is 5 numbers then [ZipCode] OR if [ZipCode] is in this format with all numbers XXXXX-XXXX" then [ZipCode]"
Can someone help me please?
Thanks!
Solved! Go to Solution.
Hi @CNichols84
One way of doing this.
IF REGEX_Match([Zip code], "\d{5}")
THEN [Zip code]
ELSEIF REGEX_Match([Zip code], "\d{5}\-\d{4}")
THEN [Zip code]
ELSE null()
ENDIF
Many thanks
Shanker V
Hi @CNichols84
If I understand the question the other way to filter.
REGEX_Match([Zip code], "\d{5}") OR
REGEX_Match([Zip code], "\d{5}\-\d{4}")
Many thanks
Shanker V
Thank you very much, it worked perfectly!! You understood exactly what I was going for :)
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |