ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Appending data field as per the condition

Sakshi_M
メテオール

Hi all,

 

Need help to build a logic, where I am taking two input files with few common fields.

I want to build a logic to populate these common fields with below condition while joining the files -

 

if <condition> update field with data from file 1 else take data from file 2. 

 

Appreciate any guidance.

Thanks 

8件の返信8
Qiu
21 - Polaris
21 - Polaris

@Sakshi_M 

Can you provide a sample input and output?

IraWatt
17 - Castor
17 - Castor

Hey @Sakshi_M,

Could you give an example inputs and output datasets? I'm not 100% on what kind of conditions you want to apply and how it should look.

Sakshi_M
メテオール

@IraWatt @Qiu

 

file1_Col_1 file2_col1
1 a
2  
3 b
4  
5 c
6  
7 d
8  
9  
10  
11 f
12  
13  
14  
15  
16  
17  
18  
19  

 

So I have above 2 columns with same name coming from file1 and file2. 

When I join both the files I want that the values for Col1 should be picked from file2 and for all null values remaining should be filled from file 1. The output should look like this:

output_col1
a
2
b
4
c
6
d
8
9
10
f
12
13
14
15
16
17
18
19
Emmanuel_G
パルサー

Hi @Sakshi_M ,

 

Find a test attached with exact desired output.

 

Let us know if it works as you want.

 

Cheers !

Emmanuel_G_0-1657529897531.png

 

grazitti_sapna
キャスター

@Sakshi_M, give this a try if helps!

 

grazitti_sapna_0-1657531275371.png

 

Thanks!

Sapna Gupta
Sakshi_M
メテオール

Thanks @Emmanuel_G and @grazitti_sapna! Both worked like a charm.

grazitti_sapna
キャスター

@Sakshi_M, I am glad we could help!

 

Thanks!

Sapna Gupta
Emmanuel_G
パルサー

@Sakshi_M  Glad to know that ! 🙂

ラベル
トップのソリューション投稿者