Alteryx Designer Desktop Discussions

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

How to combine two tables with asterisk values

Athmakuri
5 - Atom

Hi All,

 

I want to join two tables as shown in the attached image but the simple join tool doesn't work. Is there any better way/tool to help me join the tables as desired?

 

 
Table1
Col A
A*
B*
BD*
EF*
12*
*20*

    

Table 2
Col B
2021*
2022*
ABC*
ABCD*
123*
AZC*
12021*

 

Desired output

 

ColAColB
A*ABC*
A*ABCD*
A*AZC*
20*2021*
20*2022*
20*12021*
12*123*

 

 

Thanks,

Vinay

4 REPLIES 4
ShankerV
17 - Castor

Hi @Athmakuri 

 

Please make use of the below steps.

 

Step 1: Append tool

 

Step 2: Filter tool

 

contains([Col B],[Col A]) AND Left([Col A], 1) = Left([Col B], 1)

 

Note: I have removed the * from input and then added the * to the output after Step2

After Step 1, I removed the * using Formula tool.

TRIM([Col A],"*")

TRIM([Col B],"*")

 

After step 2, added the * using formula tool.

[Col A] + "*"

[Col B] + "*"

 

Many thanks

Shanker V

Felipe_Ribeir0
16 - Nebula

Hi @Athmakuri 

 

Try this workflow:

append.png

Athmakuri
5 - Atom

Thank you @ShankerV

 

I tried this solution but I have cases, where Table 1 contains *123 and Table 2 contains *12345*. In this case, it should not match but the workflow you have mentioned is not working in this case as it is joining these values.

 

Thanks,

Vinay

Athmakuri
5 - Atom

Thank you Felipe,

 

I tried this solution but I have cases, where Table 1 contains *123 and Table 2 contains *12345*. In this case, it should not match but the workflow you have mentioned is not working in this case as it is joining these values.

 

Thanks,

Vinay

Labels