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

Add columns from one table to another table so data lines up to the key field

ptopkis
6 - Meteoroid

Greetings. 

 

I need help getting data into input to export to file for Tableau. Right now I have two tables. One has required training. The other has completed training. They can be linked using a common ID. What I need to do is add the completed columns to a table with the required info so the information lines up to the correct idea. I tried JOIN and UNION without success. 

 

They are in TWO separate files so I'm trying to use Alteryx to automate creating the file on a daily basis. 

 

So Data file 1 looks like this

 

IDRoleReq Training 1Req Training 2Req Training 3
ALeadxx 
CMgrxxx
BTech  x

 

Data file two looks like this

IDComplete Training 1Complete Training 2Complete Training 3
A2017  
C   
B  2017

 

I want it to end up like this:

IDRoleReq Training 1Req Training 2Req Training 3Com Train 1Com Train 2Com Train 3
ALeadxx 2017  
CMgrxxx   
BTech  x  2017

 

Join is giving me this:

IDRoleReq Training 1Req Training 2Req Training 3IDCom Train 1Com Train 2Com Train 3
ALeadxx     
CMgrxxx    
BTech  x    
     A2017  
     C   
     B  2017

 

Union is giving me this:

IDRoleReq Training 1Req Training 2Req Training 3Com Train 1Com Train 2Com Train 3
ALeadxx    
CMgrxxx   
BTech  x   
A    2017  
C       
B      2017

 

Thank you

5 REPLIES 5
nick_ceneviva
11 - Bolide

Join should do what you are looking for.  The attached workflow has the join and your desired output.  Please let me know if you have any questions

ptopkis
6 - Meteoroid

That provides an inner join. Is there a way to an outer join? Not all the data in one set is in the other set. 

DavidxL
9 - Comet

You can use a Union on the different output tabs of the Join. e.g. L+J = LEFT OUTER join

 

 

ptopkis
6 - Meteoroid

I found this that helped explain what you shared:

https://help.alteryx.com/10.0/index.htm#Join.htm#OtherJoins


 

 


 

GideonM
6 - Meteoroid

@

Labels