Monthly customer churn rate with PREVIOUSMONTH and EXCEPT
Of the customers who bought last month, what share didn’t buy this month? A monthly churn rate built from two customer lists held in table variables.
You will learn to
- Build last month’s customer list with PREVIOUSMONTH
- Reuse one table variable in the numerator and the denominator
- Explain why a change in customer counts is not a churn rate
How it works
The **churn rate** is the share of the customers you had that you lost. Monthly churn asks it about last month’s customers: how many of them didn’t buy again this month? As a rate it can be compared between months, regions or segments of different sizes.
Both numbers come from the same list, so keep it in a variable: `VAR LastMonthBuyers = CALCULATETABLE(VALUES(Sales[CustomerKey]), PREVIOUSMONTH('Date'[Date]))`. A table variable can be counted with `COUNTROWS` and also used inside `EXCEPT`, without repeating the CALCULATETABLE.
Don’t shortcut it with `1 - [Customers] / [Customers Last Month]`. That compares two head counts, and new or returning customers fill the gaps left by the ones who stopped: the result can even be negative. Churn has to follow the actual people, which is what EXCEPT does.
Practice it hands-on with a real data model and a live report that updates as you type.
Share of Last Month’s Bike Buyers Who Skipped Bikes =
VAR BikeBuyersLastMonth = CALCULATETABLE(VALUES(Sales[CustomerKey]), PREVIOUSMONTH('Date'[Date]), Product[Category] = "Bikes")
VAR BikeBuyersNow = CALCULATETABLE(VALUES(Sales[CustomerKey]), Product[Category] = "Bikes")
RETURN DIVIDE(COUNTROWS(EXCEPT(BikeBuyersLastMonth, BikeBuyersNow)), COUNTROWS(BikeBuyersLastMonth))