Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
RÉSOLU

Join two tables to get all fields in table1 and add fields in table2 at end.

DuaneS
Atome

I am joining two tables (not really tables, excel to an existing work flow).

Table one has hundred lines.  Table two has one line.

I need to join in a way that I see all fields of Table1 and the line of table2 are new fields to the end of table1.

 

The reason being I need to do a case (IF) statement where if fieldX > 2 use table2. fields else use Table1. fields.

 

This is a very common thing to do in SQL.  

 

I am guessing there is a "join" that allows this, but I have not been able to find it.


Thank you.

 

Example:  

Table1 fields:   Dept |  Sales | Mature_Flag

Table2 fields:  Dept | Sister_Dept | Sales

Join Table1  Dept = Table2 Sister_Dept

 

Results

Table1.Dept, Table1.Sales,Table2.Dept,Table2.Sister_dept, Table2.Sales

 

Then I can do an IF statement like this.

IF mature_flag > 2 THEN Table1.sales ELSE Table2.sales ENDIF

 

3 RÉPONSES 3
saveeshkumar
Comète

Hi @DuaneS ,

 

Please use Join[J and (L or R) ] & Union Tool to get above output.

 

Thanks.

TheOC
15 - Aurora
15 - Aurora

hey @DuaneS 

I believe i've achieved what you need.
Please have a look and let me know, workflow is attached:

TheOC_0-1645630026585.png




Bulien
DuaneS
Atome

doesn't work.  The union puts the new fields as rows.  I don't need them as rows.  I need a join as table1 and table2 as separate feilds.

Étiquettes