We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

applying contains formula for checking values in two coulumns

Jules22
8 - Asteroid

d1.png

 

Data before formula 

Formula:
 

d2.png

After Formula:

d3.png

for cases like below as such as "Individuals" in one and "Entities & Individuals" in other i want Y in "Borrower Match"

same for "Entities" in one and "Entities & Individuals" in other i want Y in "Borrower Match"

d4.png

2 REPLIES 2
binuacs
21 - Polaris

@Jules22 you need to adjust the formula to check both ways

 

If contains([borrower type],[borrower type2]) or contains([borrower type2],[borrower type]) then 'Y' else 'N' 
ENDIF 

 

DataNath
17 - Castor
17 - Castor

Hey @Jules22 - looks like you need to do the check both ways. At current, you're just checking that [Borrower Type] contains what's in [Borrower Type2], which works for the first lot. However, when there's more to the string like in the bottom example, you're not checking whether [Borrower Type2] contains what's in [Borrower Type]. To do this you can expand your expression to:

 

IF Contains([Borrower Type], [Borrower Type2])
OR Contains([Borrower Type2], [Borrower Type]) 
THEN "Y"
ELSE "N"
ENDIF
Labels
Top Solution Authors