community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

IF Formula Help

Highlighted
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!

Alteryx Certified Partner
Alteryx Certified Partner

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,

Alteryx Partner

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