Repeat customer rate with FILTER and CALCULATE

Find the share of buying customers who placed more than one order line in the period — a classic loyalty KPI.

You will learn to

  • Count customers that meet a condition with COUNTROWS and FILTER
  • Use CALCULATE inside FILTER so each customer sees only their own sales
  • Turn a count into a rate with DIVIDE

How it works

A **repeat customer** bought more than once in the period. To count them, walk through the `Customer` table with `FILTER` and keep the customers whose own number of order lines is above one.

“Their own” is the important part. Inside FILTER you are on one customer row, but a row doesn’t filter Sales by itself: a bare `COUNTROWS(Sales)` would count every visible order line, for every customer. Wrapping the count in `CALCULATE` turns the current customer into a filter (**context transition**), so each customer counts only their own lines.

Divide by the customers who bought at all, and you have the rate.

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

Bulk Buyers = COUNTROWS(FILTER(Customer, CALCULATE(SUM(Sales[Quantity])) >= 10))