Alteryx Designer Desktop Discussions

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

Filter statement

Hi2023
8 - Asteroid

How do I write the below filter :

 

I want to filter out the below  but it is not working ---do I need to add something?

 

 ([CountDistinct_System_J1]=1 and Contains([Dup_System_J1],"**bleep**"))

OR  ([CountDistinct_System_J2]=1 AND Contains("**bleep**",[Dup_System_J2]))

OR ([CountDistinct_System_J3]=1 AND Contains("**bleep**",[Dup_System_J3]))

 

thanks

4 REPLIES 4
DataNath
17 - Castor

Hey @Hi2023 it looks like your contains expressions are out of order here:

 

([CountDistinct_System_J1]=1 and Contains([Dup_System_J1],"**bleep**"))

OR  ([CountDistinct_System_J2]=1 AND Contains("**bleep**",[Dup_System_J2]))

OR ([CountDistinct_System_J3]=1 AND Contains("**bleep**",[Dup_System_J3]))

 

The Syntax is Contains([Field],<Target>) so should be

([CountDistinct_System_J1]=1 and Contains([Dup_System_J1],"**bleep**"))

OR  ([CountDistinct_System_J2]=1 AND Contains([Dup_System_J2],"**bleep**"))

OR ([CountDistinct_System_J3]=1 AND Contains([Dup_System_J3],"**bleep**"))

PanPP
Alteryx Alumni (Retired)

Hi @Hi2023 

 

The contain expression (Contains(String, Target)) is defined below:

 

The string value is the column name

Target is what values you are looking for.

 

Hi2023
8 - Asteroid

So  I dont have to add anything else besides what you have above?

DataNath
17 - Castor

Looks fine other than that @Hi2023 - in filters, the statement is automatically evaluated as a boolean so no need to add an if statement around it or anything. Should be good to go!

Labels