To fix the error “IN operator is not supported” in DAX, one can apply an alternate syntax to use a similar type of filtering. In SQL, the IN clause is used to check whether a value exists in a list, while in DAX, such functionality can be achieved with the use of functions such as CONTAINS or a series of OR statements, depending on the exact situation.
Another approach frequently utilized in this case is to apply the CONTAINS function, which verifies whether a certain table has rows that satisfy the given criteria. For instance, let’s say you are trying to filter for specific values in a list where the use of IN might not be appropriate. You could also use CONTAINS instead of IN as follows.
FILTER(Table, CONTAINS({ "Value1", "Value2", "Value3" }, [ColumnName], Table[Column]))
Another approach is to use OR statements to achieve similar results. This works well if you have only a few values to check. For instance:
FILTER(Table, Table[Column] = "Value1" || Table[Column] = "Value2" || Table[Column] = "Value3")
These approaches should help avoid the “IN operator not supported” error in DAX and give you the filtering functionality you need.