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

Alteryx Designer Desktop Discussions

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

Why does this filter not work?

craigja
9 - Comet

Why does the below filter, not actually filter anything out?

 

[fund_status] != "MODEL-DEAD"
or [fund_status] != "DELETE"
or [fund_status] != "PROSPECTIVE"

5 REPLIES 5
ChrisTX
16 - Nebula
16 - Nebula

Guessing you should use AND (not OR)

 

You could also use something like this

 

[fund_status] NOT IN ("MODEL-DEAD", "DELETE", "PROSPECTIVE")

 

Chris

binuacs
21 - Polaris

@craigja Use the AND operator instead OR 

[fund_status] != "MODEL-DEAD"
AND [fund_status] != "DELETE"
AND [fund_status] != "PROSPECTIVE"
ShankerV
17 - Castor

Hi @craigja 

 

Are you expecting the result like this.

 

ShankerV_0-1686567811540.png

 

ShankerV_1-1686567822092.png

 

 

Input was:

ShankerV_2-1686567839581.png

 

 

Many thanks

Shanker V

craigja
9 - Comet

Figured it out - or rather I asked ChatGPT and it figured it out!

 

In Alteryx, you are using an "or" condition in your filter, which may not provide the desired results when filtering out rows based on multiple unequal conditions. In your current filter, if any of the conditions are true, the row will be included in the filtered data set, which may not exclude all of the undesired records. To fix the filter and exclude rows containing "MODEL-DEAD", "DELETE", or "PROSPECTIVE", you should use an "and" condition instead:

```
[fund_status] != "MODEL-DEAD"
and [fund_status] != "DELETE"
and [fund_status] != "PROSPECTIVE"
```

This way, you ensure that only rows where all three conditions are true (none of these fund statuses are matched) will be included in the filtered data.

craigja
9 - Comet

Thanks for the answers though!  All makes sense now

Labels
Top Solution Authors