## How does theIN Operator / CONTAINSROW function (DAX) work?

IN Operator / CONTAINSROW function (DAX) returns TRUE if a value row exists or is included in a table, otherwise FALSE returns. Except for syntax, the IN operator and CONTAINSROW function are functionally equivalent.

## IN Operator Formula Syntax

``<scalarExpr> IN <tableExpr> ( <scalarExpr1>, <scalarExpr2>, … ) IN <tableExpr>``

## CONTAINSROW Formula Syntax

``CONTAINSROW (<tableExpr>, <scalarExpr>[, <scalarExpr>, …])``

## How do you use the IN Operator / CONTAINSROW function?

The IN operator internally executes CONTAINSROW.

## Considerations when using the IN Operator / CONTAINSROW function

The number of scalarExprN must match the number of columns in tableExpr.

Unlike the = operator, the IN operator and the CONTAINSROW function perform strict comparison. For example, the BLANK value does not match 0.

NOT IN is not an operator in DAX. To perform the logical negation of the IN operator, put NOT in front of the entire expression.

## Formula examples using the IN Operator / CONTAINSROW function

``````EVALUATE FILTER(ALL(DimProduct[Color]), [Color] IN { "Red", "Yellow", "Blue" })
ORDER BY [Color]``````
``````EVALUATE FILTER(ALL(DimProduct[Color]), CONTAINSROW({ "Red", "Yellow", "Blue" }, [Color]))
ORDER BY [Color]``````