Free Trial

Alteryx Designer Desktop Discussions

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

Formula Replacing Multiple "ID code"

jcsoh
7 - Meteor

Hi all,

 

I I would like to replace some of ID in the "ID code" column. Please advise how I could do it in Alteryx? I list below examples of what I want.

 

Before:

Company NameID codeTotal
Company A1100

Company B

2200

Company B

3300
Company D4400
Company E5500
Company F6600
Company G7700
Company H8800
Company I9900

 

After:

Company NameIDTotal
Company A1100

Company B

BB200

Company B

BB300
Company DDE400
Company EDE500
Company F6600
Company GOTH700
Company HOTH800
Company IOTH900

 

Cheers,

J

4 REPLIES 4
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

What have you tried so far?

This looks like it just requires a formula.

Example: 

if 

[Company Name] ='Company B'

then 

'BB'

elseif

.....

and so on.

jcsoh
7 - Meteor

Hi @patrick_mcauliffe do you mind doing up some mockups based on my examples? I tried your suggestion but didn't seem to work.

DavidP
17 - Castor
17 - Castor

As @patrick_mcauliffe said, you can use an IF ELSEIF statement, either on Company Name or ID

 

DavidP_0-1593988906189.png

 

grazitti_sapna
17 - Castor

Hi @jcsoh , you can either use this formula on id code or company to get the desired output.

 

grazitti_sapna_0-1594010315065.png

 

 

 

 

 

 

 

 

Sapna Gupta
Labels
Top Solution Authors