DAX function
EXCEPT — DAX function reference
Rows in the first table only.
Syntax
dax
EXCEPT(<table1>, <table2>)
Examples
dax
EXCEPT(VALUES(A[ID]), VALUES(B[ID]))
→ A table
dax
EXCEPT(VALUES(Customer[CustomerID]), CALCULATETABLE(VALUES(Sales[CustomerID]), Sales[Year] = 2026))
→ Customers who exist but have not purchased in 2026 — a lapsed/at-risk list
dax
COUNTROWS(EXCEPT(VALUES(Product[ProductID]), VALUES(Sales[ProductID])))
→ Count of products that have never sold
Common mistakes & gotchas
- EXCEPT is order-sensitive, unlike INTERSECT/UNION — EXCEPT(A, B) returns rows in A that aren’t in B, while EXCEPT(B, A) returns the opposite set; swapping the arguments changes the answer.
- Like INTERSECT and UNION, both tables need the same number of columns with compatible types — mismatched shapes throw an error, not a partial match.
Related DAX functions
From Tables & set operations