ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Replace

ksarker
7 - Meteor

Hello, 

How to solve this following issue - 

 

if Column A contain 123 then 

if Column B contain XYZ then -------------

Replace Column C into "Only EXP" 

 

11 REPLIES 11
binu_acs
21 - Polaris

@ksarker Here is one way of doing this with the multi-field formula tool

 

binuacs_1-1678812745107.png

 

 

with formula tool

binuacs_2-1678812847017.png

 

Christina_H
14 - Magnetar

Based on your data, is column C a numeric column?  If so you'll need to change it to a string before you can put string data in it.  Use a select tool to convert it, then use the formula from above to set the values.  The only change it to retain the values where the condition is false:

IF [Column A]="ABC" AND [Column B]="XYZ" THEN "EXP Only" ELSE [Column C] ENDIF

 

You were previously using 123 as the value for Column A.  If Column A is also numeric, drop the quote marks around the value:

IF [Column A]=123 AND [Column B]="XYZ" THEN "EXP Only" ELSE [Column C] ENDIF

Labels
Top Solution Authors