Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

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

Highlighted
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

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.

Highlighted
8 - Asteroid

Thank you very much. It works perfectly. 

Labels