IN Function (DAX)

How does the IN function (DAX) work?

IN function (DAX) returns True if the scalar value shows up in at least one row of the input relation.

IN Formula Syntax

IN 

How do you use the IN function?

The IN operator can be used also with dynamic expressions, and it can compare more than one or column.

Related Blog Posts

Related Support Forum Posts

IF Function needs a calculation
Multi Criteria, IF and contains
Handling Negative Margin Calculation

Considerations when using the IN function

As it is often the case in DAX, the IN operator is just syntax sugar for calling another DAX function.

The syntax that follows the IN operator is a table constructor, and each row can have a row constructor when its content has more than one column.

Related Video Tutorials

EDNA TV-Unique subtotal
EDNA TV-Harvesting a slicer selection

Formula examples using the IN function

Filtered Sales:=CALCULATE (
        [Internet Total Sales], 'Product'[Color] IN { "Red", "Blue", "Black" }
    )

Related DAX Functions

Logical Functions
FALSE
NOT

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide
Membership