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>

Last update: Jun 11, 2019   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

DAX Conventions
Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

Contribute

Want to improve the content of Strictly equal to (==)? Did you find any issue? Please, report it us!
All submissions will be evaluated for possible updates of the content.