You must use a logical expression with FILTER (Error 37)

You have attempted to issue SET FILTER TO on an expression that is not a logical expression. For more information, see Creating Logical Expressions.