We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to use IF Contains([TextMessage], "xx")

Feras95p
8 - Asteroid

I want to know how I can use IF Contains([TextMessage], "xx") Then if the TestMessage contains xx I want to do the subtraction by 1 into output column I will identified witch column but I don't know how to do the subtraction by 1

2 REPLIES 2
Lbunce
7 - Meteor

In the formula tool, you can change the output column to whichever column is needed then use the following formula.

 

If contains([TextMessage], "xx") then [var] - 1 else [var] endif

 

you might need an = TRUE before the then, I can't remember off the top of my head but that will subtract 1 from a variable if the string contains "xx" otherwise it will just leave it as it is.

Feras95p
8 - Asteroid

Thank you very much. It works perfectly. 

Labels
Top Solution Authors