Alteryx Designer Desktop Discussions

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

Merging two columns into one to remove blank cells & duplications

LucyR
6 - Meteoroid

Hi,

 

Can someone please advise how to merge first two columns (Fund code and Fund code#) into one?

LucyR_0-1574339692902.png

Thanks a mil!

Lucy

7 REPLIES 7
Thableaus
17 - Castor
17 - Castor

Hi @LucyR 

 

You can use the Formula Tool to do that.

 

Create a New Column - 

 

IF IsEmpty(Fund Code) and !IsEmpty(Fund Code #) THEN Fund Code #

ELSEIF IsEmpty(Fund Code #) and !IsEmpty(Fund Code) THEN Fund Code

ELSE Fund Code ENDIF 

 

Drop the two old columns with the Select Tool.

 

Cheers,

LucyR
6 - Meteoroid

Hi,

 

Thanks for your response but it doesn't seem to be working. Please see below and advise. Thanks a mil

 

LucyR_0-1574340764235.png

GiuseppeC
Alteryx
Alteryx

Hi @LucyR,

 

all field names in your expression should be enclosed in square brackets (i.e. [Fund Code] rather than Fund Code).

 

Hope this helps,

Giuseppe

Thableaus
17 - Castor
17 - Castor

@LucyR 

 

I mistyped the second else, it should be ELSEIF


Also, add the brackets as @GiuseppeC  mentioned

 


IF IsEmpty([Fund Code]) and !IsEmpty([Fund Code #]) THEN [Fund Code #]

ELSEIF IsEmpty([Fund Code #]) and !IsEmpty([Fund Code]) THEN [Fund Code]

ELSE [Fund Code] ENDIF

 

Cheers,

LucyR
6 - Meteoroid

It is still not working. Please see below

LucyR_0-1574341124916.png

LucyR
6 - Meteoroid

@Thableaus

 

I fixed ELSEIF formula and it isn't working. Please see below

LucyR_0-1574341322626.png

Thableaus
17 - Castor
17 - Castor

@LucyR 

 

You forgot to add parenthesis between the fields.

 

Copy and paste this expression

 

IF IsEmpty([Fund Code]) and !IsEmpty([Fund Code #]) THEN [Fund Code #]

ELSEIF IsEmpty([Fund Code #]) and !IsEmpty([Fund Code]) THEN [Fund Code]

ELSE [Fund Code] ENDIF


Cheers,

Labels