Strictly equal to (==) DAX Operator
The “strictly equal to” operator == returns TRUE when the two arguments have the same value or are both BLANK.
A comparison between BLANK and any other value returns FALSE.
This operator does not perform any implicit conversion between strings and numbers.
This comparison differs from = only when at least one of the two terms is BLANK, empty string, or 0.
The following are valid expressions using the “strictly equal to” operator.
Product[Color] == "Red" Product[Color] == BLANK() -- Returns TRUE if Product[Color] is BLANK, returns FALSE if it is "" or any other value Product[Color] == "" -- Returns TRUE if Product[Color] is an empty string, returns FALSE if it is BLANK or any other value Sales[Quantity] == 1 Sales[Quantity] == BLANK() -- Returns TRUE if Sales[Quantity] is BLANK, returns FALSE if it is 0 or any other value Sales[Quantity] == 0 -- Returns TRUE if Sales[Quantity] is 0, returns FALSE if it is BLANK or any other value
The following are equivalent expressions using different comparison operators.
-- The following two expressions return the same result AND ( <exp> = 0, NOT ISBLANK( <exp> ) ) <exp> == 0 -- The following two expressions return the same result AND ( <exp> = "", NOT ISBLANK( <exp> ) ) <exp> == ""
There is no “strictly not equal to” operator (such as <> vs. ==), which can be obtained by using the NOT of the “strictly equal operator”:
<exp> == <value> -- <exp> strictly equal to <value> NOT ( <exp> == <value> ) -- <exp> strictly not equal to <value>
Compatibility: the “strictly equal to” operator == is available in Power BI, Azure Analysis Services, and Analysis Services 2019. It is not available in earlier versions of Analysis Services and in Power Pivot for Excel.
Last update: Mar 28, 2020 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber