DAX code
Lost Customers =
VAR CurrentCustomers = VALUES('Sales'[CustomerID])
VAR PriorCustomers = CALCULATETABLE(VALUES('Sales'[CustomerID]), SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
COUNTROWS(EXCEPT(PriorCustomers, CurrentCustomers))
Counts customers who purchased in the previous period but have no purchases in the current period.
Type your table and column names once. Every measure below updates.
Lost Customers =
VAR CurrentCustomers = VALUES('Sales'[CustomerID])
VAR PriorCustomers = CALCULATETABLE(VALUES('Sales'[CustomerID]), SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
COUNTROWS(EXCEPT(PriorCustomers, CurrentCustomers))
Swap SAMEPERIODLASTYEAR for a different offset (e.g. PARALLELPERIOD by month) to compare shorter periods.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Lost Customers.