Alteryx Designer Desktop Discussions

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

how to pick necessary columns from input files to output file

krishnapothula
6 - Meteoroid

Hi All,

 

I have 3 input files with codes and yearly data against it. i need an output file to have the codes and yearly data mentioned side by side to compare. adding a dummy file for understanding. Please guide.

 

krishnapothula_0-1626675812217.png

 

8 REPLIES 8
DawnDuong
13 - Pulsar
13 - Pulsar

hi @krishnapothula 

It looks like a case to use the Join tool. See below the help document. 

https://help.alteryx.com/20212/designer/join-tool

 

If you have not done so yet, highly recommend that you check out the Interactive Lessons under "Alteryx for Excel Users". This will save you from a thousand V-lookUp.


Dawn.

atcodedog05
22 - Nova
22 - Nova

Hi @krishnapothula 

 

Can you provide the displayed sample file so that we can help you out with an example workflow.

krishnapothula
6 - Meteoroid

@atcodedog05 thank you - please find attached

atcodedog05
22 - Nova
22 - Nova

Hi @krishnapothula 

 

Here is how you can do it.

 

Workflow:

atcodedog05_0-1626678525029.png

1. I am using join multiple to do a full outer join on all 3 data sources.

2. Since no datasource has the key column code with all the values in it. We need to apply formula to fill in the column code from their respective datasource code column.

 

Hope this helps : )

 

krishnapothula
6 - Meteoroid

@atcodedog05 - if i have multiple columns like code, will the same formula work? i have 4 such columns like code and 8 columns for different years as BM.

atcodedog05
22 - Nova
22 - Nova

Hi @krishnapothula 

 

Yes, if you tweak the formula in the similar way it can accommodate like below. You can add more else if block to accommodate more code columns.

 

IF !IsEmpty([Input_#2_Code]) THEN [Input_#2_Code] 
ELSEIF !IsEmpty([Input_#3_Code]) THEN [Input_#3_Code] 
ELSEIF !IsEmpty([Input_#4_Code]) THEN [Input_#4_Code] 
ELSE [Code] ENDIF

 

Hope this helps : )

krishnapothula
6 - Meteoroid

Omg, it worked, thank you so soo much. this really really helped

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @krishnapothula 

Labels