Equal to (=) DAX Operator
The “equal to” operator = returns TRUE when the two arguments have the same value.
This operator does not perform any implicit conversion between strings and numbers.
A comparison between BLANK and 0 or between BLANK and an empty string returns TRUE.
This comparison differs from == only when at least one of the two terms is BLANK.
The following are valid expressions using the “equal to” operator.
Product[Color] = "Red" Product[Color] = BLANK() -- Returns TRUE if Product[Color] is either BLANK or an empty string, otherwise returns FALSE Product[Color] = "" -- Returns TRUE if Product[Color] is either BLANK or an empty string, otherwise returns FALSE Sales[Quantity] = 1 Sales[Quantity] = BLANK() -- Returns TRUE if Sales[Quantity] is either BLANK or 0, otherwise returns FALSE Sales[Quantity] = 0 -- Returns TRUE if Sales[Quantity] is either BLANK or 0, otherwise returns FALSE
The following are equivalent expressions using different comparison operators.
-- The following two expressions return the same result OR ( <exp> == 0, ISBLANK( <exp> ) ) <exp> = 0 -- The following two expressions return the same result OR ( <exp> == "", ISBLANK( <exp> ) ) <exp> = ""
See Handling BLANK in DAX for more details about BLANK comparisons.
Last update: Aug 16, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber