Check if values in one column exist in another column
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Documentation
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
