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"
| Type | Label Code | Country Code |
| Apple | A | X |
| Apple | B | Y |
| Apple | C | X |
| Apple | F | Y |
| Orange | A | X |
| Orange | B | X |
| Orange | C | X |
| Pear | A | X |
| Pear | B | X |
| Pear | C | Y |
| Pear | D | Y |
Solved! Go to Solution.
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'
Similar to @flying008 but in one statment
[Country Code] !="Y"
and
(
([Type] = "Orange" && [Label Code] in ('A', 'B')) or ([Type] = "Apple" && [Label Code] = 'C')
)
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
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
Hi, @Apple_Orange
[Country Code] != "Y" && (([Type] in ('Orange','pear') && [Label Code] in ('A', 'B')) || ([Type] = "Apple" && [Label Code] = 'C'))| Type | Label Code | Country Code |
| Apple | C | X |
| Orange | A | X |
| Orange | B | X |
| Pear | A | X |
| Pear | B | X |
([Country Code] != "Y" && [Type] not in ('Orange','Apple')) || (([Type] = "Orange" && [Label Code] in ('A', 'B')) || ([Type] = "Apple" && [Label Code] = 'C'))
