Alteryx Designer Desktop Discussions

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

If/Then trouble

nihou
8 - Asteroid

Source

PCCBM
3CBM
7NON CBM
8NON CBM
3NON CBM
7NON CBM
8CBM
3CBM
7CBM
8CBM

 

Desired Output

PCCBM
33CBM
7NON CBM
8NON CBM
3NON CBM
7NON CBM
33CBM
33CBM
33CBM
33CBM

 

I am trying to use the formula tool to change the PC, where CBM = CBM, when CBM= NON CBM, I want it to stay the same

 

any tips?

3 REPLIES 3
Sebastiaandb
12 - Quasar

@nihou 

 

Here you go: 

 

Sebastiaandb_0-1632894007118.png

 

This should work out for you! Just let me know if this is what you're looking for! Greetings Seb

dbmurray
8 - Asteroid

Do you have to change the PC field?

 

Should be able to do this using the formula tool

 

dbmurray_2-1632894349243.png

 

 

This will create a new field which does what you need.

 

dbmurray_4-1632894385087.png

 

 

You could then use a select to drop and then rename the new field to PC and get your exact output. Alteryx workflow attached.

 

dbmurray_3-1632894369902.png

 

Workflow attached

dbmurray_5-1632894478335.png

 

 

good luck

Darragh

 

Ps. please consider selecting this as the 'solved' answer if it solves your query. 

dbmurray
8 - Asteroid

Here's an alternate flow that does _exactly_ what you're asking and simply replaces PC with 33 if CBM is in the CBM column.

 

dbmurray_6-1632894607485.png

 

Labels