Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
hic
Former Employee
Former Employee

 

An ABC analysis is a dynamic bucket classification of e.g. products, based on some property, usually the sales number. The best products are your "A" products and the worst are your "C" products.

It is used in all types of business intelligence applications and can appear in many different forms: It can concern any dimension, e.g. customer, supplier, sales person, etc. and be based on any measure. The sales number is one example, but it can just as well be e.g. number of support cases, or number of defect deliveries, etc.

One way to make an ABC analysis is to use a Pareto analysis where the classification is based on the accumulated number after the entities have been sorted according to their numbers. The products contributing to the first 80% are usually the A products.

However, the Pareto analysis, as described in the above blog post, is sometimes limiting: It is for instance not easy to use several dimensions, and it is not possible to define the ABC classes as a dimension. Hence, it is sometimes better to use an alternative classification function:

The Rank.

QlikView has a Rank() function that is well suited for this purpose. With it, you can rank any dimension according to any expression. You can use several dimensions and you can define your ABC classes as dimensions. The logic is that you calculate a relative rank, i.e. you divide the rank of the product with the total number of products:

     (Rank(Sum(Sales),1)-1) / Count(distinct total Product)

If this number is lower than 0.5 the product belongs to the better 50% and thus to the “A” products. Similarly you can use 0.75 as a limit for belonging to group “B”. The result will be very similar to a Pareto analysis.

Sense Bar chart.png

 

One possibility is to use colors to display the classification:

  1. Create a bar chart and choose your dimension and your basic measure. In the example below, I use Product and Sum(Sales) labeled as “Sales”.

  2. Set the color of the bars to
    If((Rank(Sum(Sales),1)-1) / Count(distinct total Product) < 0.50, RGB(140,170,200),
    If((Rank(Sum(Sales),1)-1) / Count(distinct total Product) < 0.75, RGB(255,200,0), LightRed()))
    In QlikView you do this under the expression “Background color” and in Qlik Sense you do it under “Appearance” – “Colors and Legend” for the object.

 

But you can also use this method to create a field or a calculated dimension, which means that you can make the ABC classes selectable:

     Aggr( If((Rank(Sum(Sales),1)-1) / Count(distinct total Product)< 0.50, 'A',
          If((Rank(Sum(Sales),1)-1) / Count(distinct total Product)< 0.75, 'B', 'C')),
          Product)

As Dimension.png

 

Finally, if you want to use ranking in a two-dimensional chart, you can use the same logic. However, you must first decide how the rank should be calculated. Normally you would want the ranking to be done within each group defined by the second dimension, i.e. per column in a pivot table:

Two-dimensional per column.png

 

The above chart shows sales per product and customer. The colors define the classes and the rank and the count is done within each column, i.e. the products are classified within each customer. The following expression was used:

     If((Rank(Sum(Sales),1)-1) / Count(distinct total <Customer> Product)< 0.50, RGB(140,170,200),

     If((Rank(Sum(Sales),1)-1) / Count(distinct total <Customer> Product)< 0.75, RGB(255,200,0), LightRed()))

 

But you may also want to do the ranking within each group defined by the first dimension, i.e. classify the customers within each product. Then you need to swap place of Customer and Product in the formula, and you need to use HRank() instead:

     If((HRank(Sum(Sales),1)-1) / Count(distinct total <Product> Customer)< 0.50, RGB(140,170,200),

     If((HRank(Sum(Sales),1)-1) / Count(distinct total <Product> Customer)< 0.75, RGB(255,200,0), LightRed()))

 

Two-dimensional per row.png

 

Good luck in creating your ABC analysis!

HIC

 

Further reading related to this topic:

Recipe for a Pareto Analysis

37 Comments
hic
Former Employee
Former Employee

You need to expand the expression (the small plus sign):Background qv11.png

HIC

5,982 Views
qv_testing
Specialist II
Specialist II

Great Post hic,..

It's very helpful....

0 Likes
5,982 Views
Not applicable

How do I use more than one Dimension? I need to add Code Product and Segment Product in the table.

What do I need change in these expressions?

Tks.

0 Likes
5,982 Views
psankepalli
Partner - Creator III
Partner - Creator III

Another good article from HIC.. very useful

0 Likes
5,982 Views
warfollowmy_ver
Creator III
Creator III

Hello. I need to choose. I have several stores and catalogs. And in stores and catalogs need calculate ABC through rank and count (rank / count ). How do it?- Aggr (2 or 3 demens.) + rank +set analys. as selectable

0 Likes
5,990 Views
wizardo
Creator III
Creator III

Hi,

bit late to the party i guess lol but .....

i can see how it is similar to Pareto, but here you actually select the top % of customers who are sorted by their purchases

but not the sales themselves.

what i mean is that if you say under 0.20 then you take 20% of the number of customers while they are sorted according to their purchases.

so if i have 100 customers total then i will get the 20 customers who have the most purchases. but they can represent much more or much less then 80% of purchases.

so its not exactly a Pareto

hope i made myself clear.

of course i might be wrong

Daniel

5,990 Views
vadimtsushko
Partner - Creator III
Partner - Creator III

Absolutely. That is interesting sort of analysis but in my opinion it is totally different from the ABC analysis.

Most of my projects are in retail industry. In dynamic ABC report we can get answer to such a question for example: How many products give to the company 50% of total sales amount? Set the filter to these products and proceed with futher analysis (on hand values, out of stock and so on). Most common result is something like 500 products from the total number of 8000 active products. That is very different from list of 4000 products with ranking function.

0 Likes
5,990 Views
hic
Former Employee
Former Employee

Just to get the semantics right: Both methods are ABC analyses. Or to put it differently: You can make an ABC analysis by using the pareto method (which customers contribute to the first 80% of my sales) or you can use the ranking method (which customers belong to my better 50%).

Although similar, the methods indeed have different results. The advantage with the pareto method is that it includes the information about how much the customer really has bought. The ranking method does not.

The advantage with the ranking method is that you can define the rank classes as a dimension in your chart. This is not possible if you use the pareto method.

HIC

See also Recipe for a Pareto Analysis

0 Likes
5,990 Views
vadimtsushko
Partner - Creator III
Partner - Creator III

Just to get the semantics right: Both methods are ABC analyses. Or to put it differently: You can make an ABC analysis by using the pareto method (which customers contribute to the first 80% of my sales) or you can usethe ranking method (which customers belong to my better 50%).

I would respectfully disagree on that account. I've just googled term "ABC analysis" and from top results with any explanation details i've get  five pages explicitly citing Pareto principle as a basis for ABC classification. Nowhere I see ranking method as a possible foundation for an ABC analysis.

That's is just what I would expect term of ABC analysis mean.

(I've replaced / to _ in links to circumvent moderation)

  • http:__www.ims-productivity.com_page.cfm_content_ABCPareto-analysis_
  • https:__en.wikipedia.org_wiki_ABC_analysis#cite_note-5
  • https:__www.lokad.com_abc-analysis-(inventory)-definition
  • http:__www.materialsmanagement.info_inventory_abc-inventory-analysis.htm
  • http:__www.apics-redwood.org_articles_art0302BCW.htm
0 Likes
5,990 Views
vadimtsushko
Partner - Creator III
Partner - Creator III
The advantage with the ranking method is that you can define the rank classes as a dimension in your chart. This is not possible if you use the pareto method.

In QlikView we can set selection filter on base of chart expression values, so we can set filter with customers list on base of question "which customers contribute to the first 80% of my sales".

In QlikSense we can not set selection filter on base of chart expression values, only on base of calculated dimension. So in QlikSense we can not use ABC analysis (if we sticking to use a pareto method) for setting such a filter. That a difference in a real case scenario in my view. In standard QlikSense application we can not get a list of customers that contribute to the first 80% of my sales - without getting to Excel on the exported from QlikSense files.

0 Likes
5,990 Views