Alteryx Designer Desktop Discussions

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

Specific Data required

mmustkee
9 - Comet

Hi Team, 

I have column A and Column B.

I want in column A ( The filed should be in numeric only with lengths 6 else ''" or you can make it null.

I want Column B ( The filed should starts with Alphabet only else  ''" or you can make it null.

AB
982345123
982325J345
982325z34
982300d0
As000056j
bs000s23
CD3340mdd456
34564m12s
9 REPLIES 9
apathetichell
18 - Pollux

formula tool - column a

if regex_match([A],"\d{6}") then [A] else "" endif

 

formula 2 for column B

if regex_match([B]."^\w.*") then [B} else "" endif

mmustkee
9 - Comet

@apathetichell

 

Thanks for your response however I am receiving error on Formula 2 " Parse error at character 18 Malformed function call expression 2"

Kindly help.

BRRLL99
11 - Bolide

Hi

 

For column B 

Please try this formula in Regex Tool >> ^[^a-zA-Z].*

this will select only data which starts with alphabets and remaining as null

output method >> Replace

replacement text >> null

mmustkee
9 - Comet

Thanks for your response but I have never used regex tool. Could you please help me in setting 

mmustkee_0-1684300983418.png

 

mmustkee
9 - Comet

Did not work

mmustkee_1-1684301206965.png

 

BRRLL99
11 - Bolide

BRRLL99_0-1684301233960.png

 

in null place you can try with "" also
if this resolves your query please accept it as solution

 

BRRLL99
11 - Bolide

please select only bold formula

no need for >>

mmustkee
9 - Comet

Perfect

It worked now.

flying008
14 - Magnetar

Hi, @mmustkee 

 

1- Formula for [A]:

IIF(REGEX_Match([A], "^\d{6}$"),[A], Null())

2- Formula for [B]:

IIF(REGEX_Match([B], "^[[:alpha:]].*"),[B], Null())

 

flying008_0-1684301947549.png

 

Labels