Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to Apply formula and concatenate

Kavya432
8 - Asteroid

Hi Team,

 

I am trying to apply the formula. In the attached data set If Exclusive Producer Number (length of string) is equals to 9 The I have to Concatenate "00" after first two letter and then have to place rest 5 letters beside those "00". If Exclusive Producer Number (length of string) is not equals to 9 then just need to have "NA"(all this needs to be done in new column)

Altreyx Concatenation.pngAltreyx formula.png

 

Could you please help me to guide through the process of achieving this. 

 

Thanks

Kavya

5 REPLIES 5
Thableaus
17 - Castor
17 - Castor

Hi @Kavya432 

 

I'm not so sure how your data looks like, but would something like this work?

 

IF Length([Exclusive Producer Number]) = 9 THEN

Left([Exclusive Producer Number], 2) + '00' + Right([Exclusive Producer Number],7)

ELSE

"NA" ENDIF

jamielaird
14 - Magnetar
IF Length([Exclusive Producer Number]) = 9 THEN Left([Exclusive Producer Number],2)+'00'+SubString([Exclusive Producer Number],3,6) ELSE 'NA' ENDIF

 

This or something very close should do the job,

jamielaird
14 - Magnetar

@Thableaus did it better ;)

Kavya432
8 - Asteroid

Thank you so much! it worked!

Kavya432
8 - Asteroid

Thanks a lot for the solution!

Labels