community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Check if values in one column exist in another column

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?

 

 

Highlighted
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.

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