A function 'X' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
A boolean filter argument to CALCULATE or CALCULATETABLE contains something not allowed there — usually a measure or a multi-column aggregation.
Why it happens
- Putting an aggregation in a boolean predicate:
CALCULATE ( [Sales], SUM(Sales[Qty]) > 100 ). - Using a measure directly inside the boolean filter.
- Comparing across columns inside the predicate.
How to fix it
- Move complex conditions into
FILTER:CALCULATE ( [Sales], FILTER ( VALUES ( Product[Cat] ), [Sales] > 100 ) ). - Keep CALCULATE's simple boolean predicates to one column compared against a constant.
- Remember FILTER iterates a table and can see measures; a bare boolean predicate cannot.
Triggers it
CALCULATE ( [Sales], [Sales] > 100 )
Fix
CALCULATE ( [Sales], FILTER ( VALUES ( Product[Category] ), [Sales] > 100 ) )