Free Trial

Alteryx Designer Desktop Discussions

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

Contains not working as expected

daniel_rdz
5 - Atom

Hi everyone,

I am having trouble making the following formula work properly.

 

IF Contains("APT", [Atribute]) then "APT" else Null() ENDIF

 

It works fine when [Atribute] contains "APT" by itself, but it does not work with cases such as "APT-AAA".

I want to ifentify any cell that contains "APT" ¿Am I not using the correct function?

 

Any help is appreciated.

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @daniel_rdz can you try this syntax IF Contains([Atribute], "APT") then "APT" else Null() ENDIF?

ArtApa
Alteryx
Alteryx

Hi @daniel_rdz  - As @JosephSerpis wrote you just need to swap "APT" and [Atribute] to make the expression work as you expected.

 

Here is the syntax for "Contains": Contains(String, Target, CaseInsensitive=1): Searches for the occurrence of a particular string within a string. Returns True if (String) contains (Target), else returns False.

 

You can read more in the documentation: https://help.alteryx.com/current/designer/string-functions

 

Also, you can check syntax of those functions that you do not know very well in Designer:

 

ArtApa_0-1595292722225.png

 

Labels
Top Solution Authors