DAX code
Recency (Days) =
DATEDIFF(CALCULATE(MAX('Sales'[OrderDate])), TODAY(), DAY)
Frequency (Orders) =
CALCULATE(DISTINCTCOUNT('Sales'[OrderID]))
Monetary (Sales) =
[Total Sales]
Scores each customer on recency, frequency and monetary value, the classic three inputs for customer segmentation.
Type your table and column names once. Every measure below updates.
Recency (Days) =
DATEDIFF(CALCULATE(MAX('Sales'[OrderDate])), TODAY(), DAY)
Frequency (Orders) =
CALCULATE(DISTINCTCOUNT('Sales'[OrderID]))
Monetary (Sales) =
[Total Sales]
Combine these three measures with PERCENTRANK.INC or manual banding to assign 1-5 scores for a full RFM segmentation model.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to RFM Scores (Recency, Frequency, Monetary).