Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Check if values in one column exist in another column

bjemison
7 - Meteor

Hello,

 

I have two separate files and each contains a column that I would like to compare. What I would like to do is check to see if each value from the column in file A  exists in the column in file B and if so, to return an output like "exists in file B". 

 

My initial attempt was to use the Alteryx formula tool and write an if statement like:

 

If [file_a_column_name] exists in [file_b_column_name] then "exists in file b" else "does not exist in file b"  endif

 

However, it is not allowing me to connect both files into the input anchor of the formula tool.

 

Is there a way for me to compare the columns from these two files?

 

 

2 REPLIES 2
ivoller
12 - Quasar

Can you use the Join tool and then Union the L and J anchors? The entries from A unjoined to B on the left will have Null in the join field and those that did join will have the join key.

bjemison
7 - Meteor

@ivoller, thank you for responding.

 

This seems to be working. I was able to use the join tool and then based on that output, union on the L and J anchors. I honestly never thought about this approach. Thank you again for your help.

Labels