Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Help - Find replace or join or something else?

jcsoh
7 - Meteor

Hi all,

 

If I want to match the data from "Total" column in "Table A" to the Company Name and have the data populate an empty column in "Final total" under "Table B", how should I do it? Table A and Table B are two separate input datas.

 

I would like the final output to be like Table C.

 

Table A

Company NameTotal
Company A1111111

Company B

222222
Company C333333
Company D444444

 

Table B

Company NameFinal total
Company A 

Company B

 
Company C 
Company D 

 

Table C

Company NameFinal total
Company A1111111

Company B

222222
Company C333333
Company D444444

 

Cheers,

J

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @jcsoh I mocked up a few examples on how you can do this. Let me know what you think?

jcsoh
7 - Meteor

Thanks @JosephSerpis for the prompt solution! That works. I have another question that is linked to this, I'll post it in a separate discussion post.

jcsoh
7 - Meteor

Hi @JosephSerpis / all, I have question. If the order of the company name for two input data is different from Table A and Table B, how should I match the data according to the company name? Final output is Table C.

 

Table A

Company NameFinal total
Company A 

Company B

 
Company C 
Company D 


Table B

Company NameTotal
Company D444444

Company B

222222
Company C333333
Company A1111111

 

Table C

Company NameFinal total
Company A1111111

Company B

222222
Company C333333
Company D444444

 

Cheers,

J

grazitti_sapna
17 - Castor

Hi @jcsoh,

 

In case you have small data set for your table B i suggest you use Find and Replace with table B in your find port that would be efficient, but if your data set is quite large i suggest you use the join tool to join tables a and B based on the company Name and then if you want order to be maintained as table A you can use Sort tool and sort your data on company Name.

 

I hope this helps with your query.

Sapna Gupta
JosephSerpis
17 - Castor
17 - Castor

Hi @jcsoh the Join approach that I demonstrated will sort your data into alphabetic or numerical order depending on the data fields/columns you are joining. In your example using a Join tool no matter which way you input your data the output should look like Table C. The Find and Replace approach will respect the order of the data put into the F (Find) Anchor. Therefore if you connected Table B to the F anchor and Table A to R anchor of the Find and Replace tool it will stay in the order of Table B. You can use a Sort tool though after Find and Replace tool to match Table C. 

 

I will add one caveat if you are using Alteryx Designer 2020.2 with the AMP engine turned on then the Join tool approach will not be outputted in alphabetic order and you would need to use a Sort tool afterwards. 

Labels