Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Using replace formula with IF formula from Formula Tool

ksarker
メテオール

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件の返信2
jonnyrask
アステロイド

@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
メテオール

Fabulous!!!! thanks for your help

ラベル