Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Multifield Filter.

Bruce_V
7 - Meteor

I'm trying to get multiple filter conditions to work in the same condition, but somehow it doesn't work when run together, but they do work separate from each other. 

 

Below is the the custom filter I am using. What am I missing? 

 

StartsWith("XXX", [Segment2]) AND StartsWith("XXX", [Segment1])

 

4 REPLIES 4
BenMoss
ACE Emeritus
ACE Emeritus

Your statement will return only records that meet both criteria.

I.e. the value in segment2 for a row starts with XXX and the value in Segment1 for the same row starts with XXX.

 

Segment1Segment2
XXX1XXX2
XXX1YYY2
YYY1XXX2
YYY1YYY1

 

From the above table your filter will only return the single top line where both criteria are met.

If you want either, then it must be an OR statement.

 

Based on an OR statement using the above table, lines 1,2,3 will come out of the T and line 4 through the F.

See attached.

 

Ben

MarqueeCrew
20 - Arcturus
20 - Arcturus
You just need to swap the arguments.

Cheers,
Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
BenMoss
ACE Emeritus
ACE Emeritus

Didn't even clock that one @MarqueeCrew!

Bruce_V
7 - Meteor

Thank you for this, it is confusing though as the Alteryx syntax states: 

 

StartsWith(String, Target)
Labels