Alteryx Designer Discussions

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

Multiple Criteria in Filter Tool

ashaw7
6 - Meteoroid

Hey All,

 

Wondered if i could grab some help please. It's probably something so simple but cant seem to pinpoint where i am going wrong.

 

I seem to be struggling with "and" and "or" expressions within a filter.

 

What I'm trying to filter is;

If 'SO TYPE' = AT Once and the 'ORDER STATUS' = Booked - only ( some results have partially available balance booked - i just want 'booked' by itself)  but also if 'SO TYPE' is Cust At-OnceCall-Off and 'ORDER STATUS' = Contract managed 

 

So it will search for the first criteria 1st then the 2nd criteria but both criteria filter the output through True

 

This is what I've got so far below:

 

[SO Type Desc]="At-Once Order" AND
[SO Type Desc]="Cust At-OnceCall-off"
and [Order Status]="Booked" and [Order Status]="Contract Managed"

 

I've tried various versions of this with AND and OR or CONTAINS but either doesnt filter anything or not all the information.

 

Appreciate the help

6 REPLIES 6
LordNeilLord
15 - Aurora

Hey @ashaw7 

 

After years of using Alteryx I still can't my head round the AND OR functionality but I always try and think of it as...If the values are in the same column use AND if they are in different columns use OR

 

So i would try:

 

([SO Type Desc]="At-Once Order" AND
[SO Type Desc]="Cust At-OnceCall-off")
OR ([Order Status]="Booked" and [Order Status]="Contract Managed")

 

Without some data it's hard to know the exact results of that but I'd try this first

grazitti_sapna
16 - Nebula

Hi @ashaw7 , is it possible for you to share a sample dataset along with the desired output?

As of now this is what I have understood from your query, please refer to the screenshot.

 

grazitti_sapna_0-1593158883241.png

 

Sapna Gupta
ashaw7
6 - Meteoroid

Please Find attached Data set sample.

 

ashaw7_0-1593533382475.png

I'm hoping to make it that anything that is 'At Once' and = 'Booked' also 'Cust At-OnceCall-off' and = "contract managed" are filtered off as these arent needed but it never filters the data and just includes all the data from before the filter.

 

appreciate the help

 

thanks

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @ashaw7,

 

You should be able to use:

([SO Type Desc] = 'At-Once Order' AND [Order Status] = 'Booked')
OR ([SO Type Desc] = 'Cust At-OnceCall-Off' AND [Order Status] = 'Contract Managed')

 

Jonathan-Sherman_0-1593535039455.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

oracleoftemple
9 - Comet

Try the Filter tool and use a custom filter using this:

 

([SO Type Desc] = "At-Once Order"
AND
[Order Status] = "Booked")
OR
([SO Type Desc] = "Cust At-OnceCall-off"
AND
[Order Status] = "Contract Managed")

 

Does that do the trick?

grazitti_sapna
16 - Nebula

Hi @ashaw7 , this is what I suggested in my earlier post to your problem.To use the formula given below and it will work.

([SO Type Desc] = 'At-Once Order' AND [Order Status] = 'Booked')
OR ([SO Type Desc] = 'Cust At-OnceCall-Off' AND [Order Status] = 'Contract Managed')

I hope this works for you.

Thanks. 

grazitti_sapna_0-1593577299502.png

 

Sapna Gupta
Labels