INTERSECT DAX Function (Table manipulation)

Returns the rows of left-side table which appear in right-side table.

Syntax

INTERSECT ( <LeftTable>, <RightTable> )
Parameter Attributes Description
LeftTable

The Left-side table expression to be used for Intersect.

RightTable

The Right-side table expression to be used for Intersect.

Return values

Table An entire table or a table with one or more columns.

A table that contains all the rows in LeftTable that are also in RightTable.

Remarks

Intersect is not commutative. In general, Intersect(T1, T2) will have a different result set than Intersect(T2, T1).

Duplicate rows are retained. If a row appears in table_expression1 and table_expression2, it and all duplicates in table_expression_1 are included in the result set.

The column names will match the column names in table_expression1.

The returned table has lineage based on the columns in table_expression1 , regardless of the lineage of the columns in the second table. For example, if the first column of LeftTable has lineage to the base column C1 in the model, the intersect will reduce the rows based on the intersect on first column of RightTable and keep the lineage on base column C1 intact.

Columns are compared based on positioning, and data comparison with no type coercion.

The returned table does not include columns from tables related to LeftTable.

Related articles

Learn more about INTERSECT in the following articles:

Related functions

Other related functions are:

Last update: Oct 13, 2018   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation: https://msdn.microsoft.com/en-us/query-bi/dax/intersect-function-dax

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.

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 INTERSECT? Did you find any issue? Please, report it us!
All submissions will be evaluated for possible updates of the content.