Find lost customers with EXCEPT: bought in 2024 but not in 2025
Learn EXCEPT on two fixed customer lists: build the 2024 and 2025 buyers with CALCULATETABLE and count who dropped off, for every product and region.
You will learn to
- Build a filtered table with CALCULATETABLE
- List customers through the fact table, not the dimension
- Count customers in one list but not the other with EXCEPT
How it works
`CALCULATETABLE(table, filters…)` is CALCULATE for tables: it returns the table under changed filters. `CALCULATETABLE(VALUES(Sales[CustomerKey]), 'Date'[Year] = 2024)` is the list of customers who bought something in 2024, still respecting every other filter (a product, a region).
Take the list from **Sales**, not from Customer. A year filter reaches Sales but never Customer, so `VALUES(Customer[Customer])` returns all 40 customers no matter which year you ask for.
Two lists, one subtraction: `EXCEPT(earlier list, later list)` keeps the customers who were there before and are missing now.
Practice it hands-on with a real data model and a live report that updates as you type.
New Bike Buyers 2025 =
VAR Before = CALCULATETABLE(VALUES(Sales[CustomerKey]), 'Date'[Year] = 2024, Product[Category] = "Bikes")
VAR Now = CALCULATETABLE(VALUES(Sales[CustomerKey]), 'Date'[Year] = 2025, Product[Category] = "Bikes")
RETURN COUNTROWS(EXCEPT(Now, Before))