Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Combine 2 columns into 1 without changing any data

Apcvirgo1
7 - Meteor

Hi all,

 

First time at this scenario, using excel input combine 2 columns into 1. The data can change, I've done this in the past when the data is constant in both fields. Tran # represents what I need a tool to do:

 

Detail
Item #
Invoice
Item #
Tran #
1 1
 11
2 2
 22
3 3
 33
4 4
 44
5 5
 55
6 6
 66
7 7
 77
8 8
 88
9 9
 99
10 10
 1010
   
1 1
2 2
3 3
 33
 33
 33
4 4
5 5
 55
 55
6 6
7 7
 77
 77
8 8
9 9
 99
 99
10 10
11 11
 1111
 1111
12 12
13 13
 1313
 1313
14 14
15 15
16 16
 1616
 1616
 1616
17 17
18 18
19 19
20 20
21 21
 2121
 2121
 2121
22 22
23 23
 2323
 2323
24 24
25 25
 2525
 2525
7 REPLIES 7
apathetichell
19 - Altair

formula - new field - Tran #

if [detail item #]!=null() then [detail item #] else if [invoice item #]!=null() then [invoice item #] else  null() endif

 

 

Apcvirgo1
7 - Meteor

Hi @apathetichell 

Thanks for the response.

I'm receiving a Malformed error, for some reason it doesn't like the endif for some reason. I type the formula IN:

 

If [Detail Item Number]!=null()
then [Detail Item Number]
else if [Invoice Item Number]!=null()
then [Invoice Item Number]
else Null()
endif

apathetichell
19 - Altair

elseif is one word.

Qiu
21 - Polaris
21 - Polaris

@Apcvirgo1 
I think we should check all the possible combinatiosn just in case.

we can also use isnull() instead of =null(). 😁

0308-Apcvirgo1.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @Apcvirgo1 

 

Here is my take

 

atcodedog05_0-1646718115777.png

 

Hope this helps : )

 

Qiu
21 - Polaris
21 - Polaris

@atcodedog05 
Nice OOTB thinking 👍

atcodedog05
22 - Nova
22 - Nova

Hi @Qiu 

 

This specific trick/habit I got it from @MarqueeCrew 😁

Labels