I want to join two files - Pass every record in my main (Let's say R) file (R and J) - I will use the L file to add a variable when the fields match - and put a null (which I can change using imputation) when they don't match.
Solved! Go to Solution.
Hi,
Just union the two outputs after the join. This will give you all records and the joined fields.
Best regards,
Daniel
It sounds like you want to JOIN the data and then follow it with a UNION.
Within the JOIN, you can DESELECT any redundant fields (like the RIGHT join key).
Connect the J Output from the join to the Union. That will be connection #1.
Connect the L Output from the join to the Union. That will be connection #2.
AutoConfigure by Name.
Ignore warnings.
Output ALL Fields
Your output from the union will contain the desired element(s) and it(they) will be NULL() when no match happens.
Thanks,
Mark
I believe what you are looking for is a full outer join. You can see how to accomplish this here: http://help.alteryx.com/9.5/Join.htm
Scroll to the 'Doing Different Types of Joins' section
The full outer join will take all of the records from your right (R) input and join to them the records from the left (L) input. Performing the union of all outputs (R,J, and L) will add NULL for the rows that don't match, which you can then impute.
Should look something like this:
That is perfect!! Thank you. I tried Join and Union separate, but didn't think to put them together.
Crystal
User | Count |
---|---|
107 | |
82 | |
72 | |
54 | |
40 |