Churned customers: bought last year but not yet this year, with EXCEPT

A churn count that follows the report’s dates: last year’s customers who haven’t bought yet this year, month by month, by subtracting this year’s buyers from last year’s with EXCEPT.

You will learn to

  • Build last year’s and this year-to-date’s customer lists
  • Subtract one list from another with EXCEPT
  • Explain why subtracting two counts gives the wrong answer

How it works

A churned customer **bought last year and hasn’t bought this year**. Early in the year the list is long (many simply haven’t been back yet), and it shrinks as customers return. Whoever is still on it in the autumn needs attention.

Build the two lists with CALCULATETABLE: - last year’s buyers: `CALCULATETABLE(VALUES(Sales[CustomerKey]), PREVIOUSYEAR('Date'[Date]))`, the whole previous calendar year; - this year’s buyers so far: the same with `DATESYTD('Date'[Date])`, from 1 January up to the end of the current period.

`EXCEPT(table1, table2)` keeps the rows of the **first** table that aren’t in the second, so order matters: last year first. Subtracting the counts, `[Customers Last Year] - [Customers YTD]`, only works when every customer this year also bought last year. As soon as there are new buyers it undercounts, and it can even go negative.

Practice it hands-on with a real data model and a live report that updates as you type.

Bike Buyers Without Clothing =
COUNTROWS(EXCEPT(
    CALCULATETABLE(VALUES(Sales[CustomerKey]), Product[Category] = "Bikes"),
    CALCULATETABLE(VALUES(Sales[CustomerKey]), Product[Category] = "Clothing")))