Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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
binuacs
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