Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Conditional replacement of text

louyang
6 - Meteoroid

Hi there,

 

I'm trying to replace text in Column C, if Column A and Column B met the conditions, if don't meet the condition, then Column C stays the same, so my formula is as below but not working:

 

if contains([Column A],'xx' and [Column B],'yyy')
THEN Replace([Column C], 'aaaa cost', 'bbbb cost')
ELSE ([Column C])
ENDIF

 

Could someone please let me know what was wrong I got here?

The formula turns to black colour, when I typed ELSE part.

Thank you.

 

Lindsay

2 REPLIES 2
geraldo
13 - Pulsar

@louyang

 

Formula:}
}

if contains([Column A],'xx') and contains([Column B],'yyy')
THEN Replace([Column C], 'aaaa cost', 'bbbb cost')
ELSE ([Column C])
ENDIF

 

louyang
6 - Meteoroid

Thank you so much geraldo, it works!

Labels