The filter arguments in CALCULATE can be written as logical conditions with certain restrictions.
This article explains the more common errors in these conditions, often described as an anomaly in a True/False expression, and how to solve them.
Read more