Free Trial

Alteryx Designer Desktop Discussions

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

Concatenate column with leading space

Ekta
8 - Asteroid

Dear All ,

I am stuck at one place in my workflow , please help me with the formula-

 

Input-

First NameMiddle NameLast Name
John SmithCarl
MaxHarley Dr.

 

if Middle Name first character is space we have to concatenate First Name and Middle Name and 

if Last Name first character is space we have to concatenate  Middle Name and  Last Name and get the following output

 

Output -

First NameLast Name
John SmithCarl
MaxHarley Dr. 

 

Many Thanks in advance

3 REPLIES 3
AngelosPachis
16 - Nebula

Hi @Ekta ,

 

I have mocked up a workflow that answers your question. 

 

Screenshot 2020-10-13 140103.jpg

 

Let me know if that works for you. 🙂

 

Cheers,

 

Angelos

Qiu
21 - Polaris
21 - Polaris

@Ekta 
I use one formula tool to get the output.

Please check if this is what you want, and if you do, kindly mark it as accepted. Thanks.Ekta.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @Ekta 

 

Seems like there is only one similar generic way to solve this.

Here is my workflow

Input:

atcodedog05_0-1602593784089.png

Output:

atcodedog05_1-1602593814171.png

Workflow:

atcodedog05_2-1602593837623.png

Formula : FirstName

 

IF Left([Middle Name], 1)=" " 
THEN [First Name]+[Middle Name]
ELSE [First Name]
ENDIF

 

Formula : LastName

 

IF Left([Last Name], 1)=" " 
THEN [Middle Name]+[Last Name]
ELSE [Last Name]
ENDIF

 

Hope this helps 🙂 give a like if you dont mind 😀👍

Labels
Top Solution Authors