Alteryx Designer Desktop Discussions

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

Using replace formula with IF formula from Formula Tool

ksarker
7 - Meteor

Hello, 

can i use Replace formula inside IF formula. i want to replace some specific line based on few criteria such as- 

 

If column A(Zip Code)=4589 then Column B(City Name)= NYC then replace "Small City" from Column D(City Type) to "Mega City" 

 

Please note on my above task we are working on both type Double Type (Column A) and V_String Type(Column B & D). 

 

can we use IF and Replace functions from Formula tool 

 

thank you 

 

 

2 REPLIES 2
jonnyrask
8 - Asteroid

@ksarker 

Yes, you can.

Example - 

Set the column you want to change to be a new column or [City Type]

IF [Zip Code]=4589 THEN REPLACE([City Type],"Small City","Mega City") ELSE [City Type] ENDIF

 

ksarker
7 - Meteor

Fabulous!!!! thanks for your help

Labels