Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

IF Formula Help

CrK42003
5 - Atom

I want to create a new column next to a column of data where if in the first column, the data in the field begins with a number, I want the result to be "Yes", if the data begins with a letter "No".  How can I go about achieving this?

 

Thanks!

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @CrK42003 

 

I'd use RegEX

 

IF REGEX_MATCH([Field1], "\d+.*") THEN "Yes" ELSE "No" ENDIF.

 

Make sure your Field is a String Type.


Cheers,

ankit_mandal
6 - Meteoroid

Hi @CrK42003 ,

You can use  Left([Field], 1)  to extract the first member of the data. Then , use a select tool and convert the field to any integer type. The data that begins with letter will result in Null. 

 

You can write the formula accordingly after that. 

 

Thanks,

Ankit.

Labels