DAX function
INTERSECT — DAX function reference
Rows present in both tables.
Syntax
dax
INTERSECT(<table1>, <table2>)
Examples
dax
INTERSECT(VALUES(A[ID]), VALUES(B[ID]))
→ A table
dax
INTERSECT(
CALCULATETABLE(VALUES(Sales[CustomerID]), Sales[Year] = 2025),
CALCULATETABLE(VALUES(Sales[CustomerID]), Sales[Year] = 2026)
)→ Customers who purchased in both 2025 and 2026 — a repeat-buyer set
dax
COUNTROWS(INTERSECT(VALUES(Product[ProductID]), VALUES(Promotion[ProductID])))
→ Count of products that are both currently stocked and currently promoted
Common mistakes & gotchas
- INTERSECT compares rows by position/value across all columns of both tables, which must have matching column counts and compatible types, similar to UNION.
- Unlike a SQL-style INTERSECT, DAX's INTERSECT doesn't force distinctness on its own — duplicate rows from the first table are preserved; wrap in DISTINCT if you need strictly unique rows.
Related DAX functions
From Tables & set operations