FILTER vs CALCULATE DAX Function

Is there a difference between the FILTER and CALCULATE Dax functions?

From what I understand, they produce the same result and are synonymous.

Is this true?

Upvotes: 2

Views: 7589

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

They aren't remotely the same.

FILTER takes a table expression as its first argument and iterates through all the rows of that table checking the condition provided in the second argument. It returns a table.

CALCULATE calculates a scalar expression (first argument) in the filter context determined by the remaining arguments. It returns a single scalar value.

Upvotes: 4

Related Questions