Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Appending data field as per the condition

Sakshi_M
7 - Meteor

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 REPLIES 8
Qiu
20 - Arcturus
20 - Arcturus

@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
7 - Meteor

@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
13 - Pulsar

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
17 - Castor

@Sakshi_M, give this a try if helps!

 

grazitti_sapna_0-1657531275371.png

 

Thanks!

Sapna Gupta
Sakshi_M
7 - Meteor

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

grazitti_sapna
17 - Castor

@Sakshi_M, I am glad we could help!

 

Thanks!

Sapna Gupta
Emmanuel_G
13 - Pulsar

@Sakshi_M  Glad to know that ! 🙂

Labels