Skip to main content

I want to make a view where I can say:


Product Status is In Stock

or

Product Status is Backordered

and

Last Sold Date

was within the last week

However, the filter menu locks to ‘And’ or ‘Or’ dependent on your first selection. Is there any chance you would revise this?

Hello Matt, the reason we don’t allow combining AND and OR operators in the filter menu directly is that the order of precedence between the operators would be indeterminate without parenthesis. In other words, it would be ambiguous whether you meant (Condition 1 AND Condition 2) OR Condition 3, vs Condition 1 AND (Condition 2 OR Condition 3).


However, a workaround is to create a Formula column, and then reference it in your filter. For example, you could create a Formula column with the formula: "AND({Food color}=green, OR({Food Type}=“eggs”, {Food Type}=“ham))”. Then the output of the formula would be either 1 or 0, and you could filter on this value. Here’s some more info about formulas: https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference


Hope that helps!


Hello Matt, the reason we don’t allow combining AND and OR operators in the filter menu directly is that the order of precedence between the operators would be indeterminate without parenthesis. In other words, it would be ambiguous whether you meant (Condition 1 AND Condition 2) OR Condition 3, vs Condition 1 AND (Condition 2 OR Condition 3).


However, a workaround is to create a Formula column, and then reference it in your filter. For example, you could create a Formula column with the formula: "AND({Food color}=green, OR({Food Type}=“eggs”, {Food Type}=“ham))”. Then the output of the formula would be either 1 or 0, and you could filter on this value. Here’s some more info about formulas: https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference


Hope that helps!


Is it possible to allow parentheses to be placed in the filter menu / find some intuitive UI of allowing this? Making a new formula can be inconvenient, especially if you have to stack it with error checking as well…


Reply