Skip to main content
Version: I2023.3.0

Comparison Operators (MDX)

Comparison operators evaluate to a Boolean data type, returning true or false based on the outcome of the tested condition.

OperatorDescription
= (equal to)For non-null arguments, returns TRUE if the left argument is equal to the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value, unless the comparison 0=null is made, in which case the Boolean is TRUE.
<> (not equal to)For non-null arguments, returns TRUE if the left argument is not equal to the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value.
> (greater than)For non-null arguments, returns TRUE if the left argument has a value that is greater than the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value.
>= (greater than or equal to)For non-null arguments, returns TRUE if the left argument has a value that is higher than or equal to the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value.
< (less than)For non-null arguments, returns TRUE if the left argument has a value that is less than the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value.
<= (less than or equal to)For non-null arguments, returns TRUE if the left argument has a value that is lower than or equal to the right argument; otherwise, FALSE. If either or both arguments evaluate to a null value, the operator returns a null value.