Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Change Cust Name with Formula function

Ar13f
10 - Fireball

Dear All,

 

I have customer segment data and I want to change it as below:

CustSegChange
Axytcrty BdydrtuAB
Pdrxc UxyvtyioPU
Xybxx AndtuXA
Cxy OpudtxuitCO

 

I created another table containing the name changes and connected the table above using the "Find & Replace" function and it worked.

What I want to ask is if this can be done with the "formula" function if so what is the formula?

 

Regards,

Arief

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @Ar13f 

 

You can use the switch function or an else if ladder. But find and replace is the best option to go with. It is much better maintainable.

Christina_H
14 - Magnetar

Are you always replacing names with the initials?  If so, something like this might help:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Keep-only-Capitals-of-String/td-p/3700...

atcodedog05
22 - Nova
22 - Nova

Hi @Christina_H 

 

Interesting take on it 🙂. I didnt look at it that way.

 

Hi @Ar13f 

 

is there any logic behind it like first letters or capital letters.

binay2448
11 - Bolide

Please find attached solution, hope it work for you..

atcodedog05
22 - Nova
22 - Nova

Hi @Ar13f 

 

Here is my take on it.

 

Workflow:

atcodedog05_0-1631785415779.png

 

Hope this helps : )

 

Ar13f
10 - Fireball

Dear @atcodedog05 

 

thank you for your advice, and I've tried with "switch" and it worked... 

 

switch.png

 

 

 

I saw advice on this community how to use "switch", what I want to ask is what does "Null()" mean and can it be replaced with something else? for my case like this, how can it be replaced?

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @Ar13f 

 

Here Null() is set as default in this usecase it is similar to else. If none of the condition matches then set to Null(). 

Ar13f
10 - Fireball

Dear @atcodedog05 , @Christina_H , @binay2448 

 

thank you all for your advice ... 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Ar13f 

Cheers and have a nice day!

Labels