Alteryx Designer Desktop Discussions

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

Using Formula and If/Then

Riot
8 - Asteroid

I am trying to create a column bassed off of another column. I want to say If Variable contains a backslash, than 1 in new column, if not, then 0, but I cant seem to get it right, Anybody good with formula ? 

2 REPLIES 2
KaneG
Alteryx Alumni (Retired)

Hi Riot,

 

In the formula tool you will set up a new column as an Int, and the formula will simply be

IF Contains([Field],"\")

THEN 1

ELSE 0

ENDIF

 

Thats for v10, if you are on an older version then

IF Findstring([Field],"\") > -1

THEN 1

ELSE 0

ENDIF

 

 

Kane

Riot
8 - Asteroid

Thank you! That worked. I feel silly for not figuring it out. 

Labels