Creating an ABC analysis
ABC analysis divides a set of information, such as customers, products, suppliers, or any other dimension, into three categories: "A" for those contributing to the first 80% of an indicator, such as costs or sales, "B' for those contributing to the next 10%, and "C" for the final 10 %.
This recipe will show you how to create an ABC analysis coloring a dimension with this classification, and use the classification as a dimension, so you can filter only the countries that fall under the "B" category, for example.
Getting ready
For this recipe, we will reuse the data load for the Using nested aggregations recipe of this chapter.
How to do it…
- Create a new
Dimension
in theMaster items
library. - In the dimension editor, select the expression editor for the field.
- Add the following expression:
=Aggr( If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.8, 'A', If(Rangesum(Above(Sum(Sales)/Sum(Total Sales),1,RowNo()))<0.9, 'B', 'C')), (Country...