Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Using the Filter with multiple parameters

jmlabelle65
7 - Meteor

See my filter parameters below - why doesn't this work?

 

[ContractType] = "SiriusXM"
or
[ContractType] = "Artist Releases DB"
AND
[Status] = "ExecutedinEffect"
or
[Status] = "ExecutedFuture"
or
[Status] = "Expired"
AND
[EndDate] >= "2019-01-01"
or
IsNull([EndDate])

4 REPLIES 4
zajaccount
9 - Comet

Hi

 

do you mean that it is not filtering the data correctly or does the tool refuse to work due to some incorrect syntax (resulting in an error)?

RolandSchubert
16 - Nebula
16 - Nebula

Hi @jmlabelle65 ,

 

I think, some brackets are needed:

 

([ContractType] = "SiriusXM" or [ContractType] = "Artist Releases DB")
AND
([Status] = "ExecutedinEffect" or [Status] = "ExecutedFuture" or [Status] = "Expired")
AND
([EndDate] >= "2019-01-01" or IsNull([EndDate]))

 

You could also use:

[ContractType] IN( "SiriusXM", "Artist Releases DB")
AND
[Status]  IN( "ExecutedinEffect", "ExecutedFuture", "Expired")
AND
([EndDate] >= "2019-01-01" or IsNull([EndDate]))

 

 

Let me know if it works for you.

 

Best,

 

Roland

 

 

grossal
15 - Aurora
15 - Aurora

Hi @jmlabelle65,

 

You have to use () in order to make it work, else Alteryx wouldn't know the way you want it to be read.

 

Try it like this:

([ContractType] = "SiriusXM" or [ContractType] = "Artist Releases DB")
AND
([Status] = "ExecutedinEffect" or [Status] = "ExecutedFuture" or [Status] = "Expired")
AND
([EndDate] >= "2019-01-01" or IsNull([EndDate]))

 

Let me know if it worked or if we need further adjustments.

 

Best

Alex 

jmlabelle65
7 - Meteor

The second statement worked, still not sure why the first didn't - but the second was more efficient logic

 

Thanks and now I learned how the logic works for setting multiple parameters

Labels