We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Joining two tables based on 2 conditions

Masond3
8 - Asteroid

HI Forum,

Probably the easiest question in the forum today.

 

I would like to join "Table 1" to "Table 2" where the "P_ID" in Table 1 matches the Account_SIV_Id__c in table 2 and the Level = Company. Once the join is established i would like to return the "ID" in "Table 2"


Table 1 : 

P_ID
18008075
18005885
18000837
18011726
18012912

 

Table 2 :

Account_SIV_Id__cLevelId 
L5_AUS_18008075Office11111a
L5_AUS_18005885Office22222a
L5_AUS_18000837Office33333a
L5_AUS_18011726Office44444a
L5_AUS_18012912Office55555a
AUS_18008075Company11111
AUS_18005885Company22222
AUS_18000837Company33333
AUS_18011726Company44444
AUS_18012912Company55555

 

Expected Outcome 

P_IDLevelId 
18008075Company11111
18005885Company22222
18000837Company33333
18011726Company44444
18012912Company55555

 

looking forward to your help


Regards
Masond

1 REPLY 1
Luke_C
17 - Castor
17 - Castor

Hi @Masond3 

 

Here's one approach:

 

  1. Filter the data to Company Level
  2. Use a formula to get the ID from the Account_SIV_Id. I used the substring method for this to return the numbers after the underscore. You could also use regex but I wanted to keep this simple.
  3. Join based on ID

 

Luke_C_0-1618937167806.png

 

Labels
Top Solution Authors