ABC classification of customers from the Pareto curve
Label customers A, B or C by where they fall on the cumulative sales curve: A up to 80%, B up to 95%, C for the long tail.
You will learn to
- Classify customers by their cumulative share of sales
- Guard a label measure against blanks
- Explain why ABC classes change with the period
How it works
**ABC classification** turns the Pareto curve into three groups. Class **A** is the customers that together make the first 80% of sales, class **B** takes the curve from 80% to 95%, and class **C** is the long tail. A gets the account managers, C gets the newsletter.
The **Cumulative Share** measure from the last recipe already says where each customer sits on the curve, so the class is a `SWITCH(TRUE(), …)` over that number.
Mind the blanks. On the total row Cumulative Share is blank, and a blank compared with a number behaves like 0: `BLANK() <= 0.8` is TRUE, so the total row would say “A”. Store the share in a variable and return a class only when it isn’t blank.
Practice it hands-on with a real data model and a live report that updates as you type.
Stock Status =
VAR Units = [Total Quantity]
RETURN IF(NOT ISBLANK(Units), SWITCH(TRUE(), Units >= 100, "High", Units >= 40, "Medium", "Low"))