What does CALCULATE do?
intermediateAnswer
CALCULATE evaluates an expression in a modified filter context. It is the only DAX function that can change filter context, which makes it the foundation of most non-trivial measures.
Filter arguments replace any existing filter on the same column by default. Wrap in KEEPFILTERS to intersect with the existing context instead.
When used where a row context exists — inside an iterator or a calculated column — CALCULATE also performs context transition, converting that row context into a filter context.
Related