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> = ""

Last update: Mar 30, 2020   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber

2018-2020 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

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.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.