We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need to segregate Numbers and alpha numeric column

Laksh345
6 - Meteoroid

I have the below data and below to that is my requirement:

 

Column A 1 2 3 5 6 7 8 9 AA BB CC1 DD2-1 

Column B 

 

If Column A is > 5 it should say "Individual" in column B 

If Column A is <5 it should say "Common" in column B 

If Column A is alphanumeric or alphabets it should say "Individual 1" in column B

6 REPLIES 6
ChrisTX
16 - Nebula
16 - Nebula

Try this in a Formula tool:

 

IF ToNumber([My Field],1,1) > 5 THEN "Individual"
ELSEIF ToNumber([My Field],1,1) < 5 THEN "Common"
ELSEIF IsNull(ToNumber([My Field],1,1)) THEN "Individual 1"
ELSE "<unknown>"
ENDIF

 

What if Column A = 5?

 

Chris

Laksh345
6 - Meteoroid
Below is the data , formula used and result. It is not working.
binuacs
21 - Polaris

@Laksh345 based on my understanding

IIF(REGEX_CountMatches([Vendor Number], '^\D+'),'Individual 1',IIF(Length([Vendor Number]) > 5,'Individual',  IIF(Length([Vendor Number])<= 5, 'Common',Null())))

image.png

ChrisTX
16 - Nebula
16 - Nebula

In the Formula tool, you are updating the value for the field "Type", which is defined as data type Boolean.

 

Create a new field with a string data type if you want values like "Individual".

 

Screenshot 2024-05-06 105923.png

Laksh345
6 - Meteoroid

Thank you Chris. It worked!

Laksh345
6 - Meteoroid

Thank you. It is not about the length, it is about the Alpha numeric. Thanks for your help. I got an solution anyway.

Labels
Top Solution Authors