In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

If Contains

Johmz
8 - Asteroid

Hi,

 

I need help for formula or syntax on how to identify if the column2 is equal to column1 or if column1 contains of what information that i have in column2.

 

see example

 

ProfessionalPersonalStatus
Attorney John DoeJohn DoeSame Person
Engineer Jane DoeJanine DoeDifferent Person
Doctor Mark DaveMark DaveSame Person
   
   
5 REPLIES 5
usmanbashir
11 - Bolide

@Johmz - Below, to be used in Formula tool, will be able to output your [Status] Field. 

 

IF Contains([Professional], [Personal]) THEN 'Same Person'
ELSE 'Different Person'
ENDIF

 

cjaneczko
13 - Pulsar

You can use the following. 

if REGEX_Replace([Professional], '\b\w+\s([A-Z][a-z]+ [A-Z][a-z]+)\b', '$1')=[Personal] then 'Same Person' Else 'Different Person' endif

 

image.png

 

Johmz
8 - Asteroid

I'm not get the correct result.Capture.PNGCapture2.PNG

Johmz
8 - Asteroid

Do i need to change the Data Type?

Johmz
8 - Asteroid

i got it now and do some changes. thanks for your help.

Labels
Top Solution Authors