Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter rows per the conditions

Apple_Orange
8 - Asteroid

Hi Community,

 

Could Alteryx help to filter per below in easiest way. Thanks

 

1) Exclude the row if Country code is Y

2) Include rows with Label code "A" and "B" in Type code "Orange"

2) Include rows with Lobel code "C" in Type Code "Apple"

 

TypeLabel CodeCountry Code
AppleAX
AppleBY
AppleCX
AppleFY
OrangeAX
OrangeBX
OrangeCX
PearAX
PearBX
PearCY
PearDY
5 REPLIES 5
flying008
15 - Aurora

Hi, @Apple_Orange 

 

FYI.

1- Exclude the row if Country code is Y
[Country Code] != "Y"

2- Include rows with Label code "A" and "B" in Type code "Orange"
[Type] = "Orange" && [Label Code] in ('A', 'B')

3- Include rows with Lobel code "C" in Type Code "Apple"
[Type] = "Apple" && [Label Code] = 'C'
aatalai
15 - Aurora

Similar to @flying008 but in one statment 

 

[Country Code] !="Y"

and 
(
([Type] = "Orange" && [Label Code] in ('A', 'B')) or ([Type] = "Apple" && [Label Code] = 'C')
)

Screenshot 2025-10-28 073645.png

 

Apple_Orange
8 - Asteroid

the solution might not right. the pear under label code A and B has filter out as well. Could you please suggest a revised flow. Thanks

Apple_Orange
8 - Asteroid

1) Exclude the row if Country code is Y -- Apply to all the label code and type

2) Include rows with Label code "A" and "B" in Type code "Orange"

2) Include rows with Lobel code "C" in Type Code "Apple"

 

Only Orange and Apple have condition on label code, the rest of fruit type only need filter out if country code is Y. We have a lot of fruit type so the filter formular suggest only include Orange and Apple. Is it possible have just one statement. Thanks

flying008
15 - Aurora

Hi, @Apple_Orange 

 

[Country Code] != "Y" && (([Type] in ('Orange','pear') && [Label Code] in ('A', 'B')) || ([Type] = "Apple" && [Label Code] = 'C'))
TypeLabel CodeCountry Code
AppleCX
OrangeAX
OrangeBX
PearAX
PearBX

 

([Country Code] != "Y" && [Type] not in ('Orange','Apple')) || (([Type] = "Orange" && [Label Code] in ('A', 'B')) || ([Type] = "Apple" && [Label Code] = 'C'))
Labels
Top Solution Authors