Cast your vote for the official 2025 Inspire Pin! Designs were submitted by fellow Community members and reflect the creativity and passion of Alteryx users across the globe. Vote now!
Free Trial

Alteryx Designer Desktop Discussions

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

How to create an 'if contains' formula

jgpwc1992
5 - Atom

I am trying to write a formula given the following:

 

first column contains list of identifiers, I have created a second column. I would like the second column to be populated by any identifiers containing the text "LX" in the corresponding rows. If the identifier in column 1 does not contain "LX", the corresponding cell in the second column should remain blank.

 

Something to the effect of an 'if cell A1 contains "LX", then B1 = A1, if not null'

 

 

4 REPLIES 4
Claje
14 - Magnetar

Hi,

 

Assuming your columns were named [A] and [B] in that example, here's a formula that should work:

IF CONTAINS([A],'LX') THEN [A] ELSE NULL() ENDIF

You should write this formula on Column B so that it is the one that is updated.

 

BenMoss
ACE Emeritus
ACE Emeritus
IF CONTAINS([fieldA],"LX") THEN [fieldA] ELSE NULL() ENDIF
jgpwc1992
5 - Atom

Thank you!

martin_iglesias
5 - Atom

martin_iglesias_0-1679940852848.png

 

Labels
Top Solution Authors