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
Solved! Go to Solution.
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
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.
Please Find attached Data set sample.
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
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')
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
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?
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.