Alteryx Designer Desktop Discussions

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

Using 'not equals' and 'AND' is giving a result like 'OR'

hope_sch
5 - Atom

Hello,

 

My data set includes rows from 2018 March to 2019 March.  I'm using a filter like this:

 

[Year] != "2019" AND [Month] != "3"

 

I expected this to only exclude rows with Year=2019 and Month=3.  Instead, it excludes all rows where Month=3 (for both 2019 and 2018) and all rows where Year=2019 (for January, February, and March).  

 

Is there an alternative to my filter expression?  

Also, I'd like to understand why AND/&& is behaving like an OR.

 

Thank you,

 

Hope

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @hope_sch 

 

Try this:

 

[Year] = "2019" AND [Month] = "3"

 

Choose false side.

 

Cheers,

hope_sch
5 - Atom

Ah, this worked!  Thank you so much!

Thableaus
17 - Castor
17 - Castor

@hope_sch 

 

!([Field1] = 2019 AND [Field2] = 3)

 

This would work too.

 

When you are negating you have to be very careful how you do it. Set theory can be tricky.


Cheers,

Labels
Top Solution Authors