Customer stratification.

Many of the user stories that we take into account when we start to use more advanced data analysis and visualization techniques are not new. For example, we have probably already used basic QlikView methods to resolve the following user story.

Note

As a sales representative, I want to see who my most important customers are so that I can focus my time and effort on them.

The simplest way to define customer importance is to base it on how much they've purchased or how much profit they've generated. In its simplest form, we can resolve this user story with a bar chart that ranks customers by sales or gross profit.

However, given our increasing experience with QlikView, we'll take another look at this user story and use a more advanced analysis technique called customer stratification. This method groups customers according to their importance into bins. The number of bins can vary, but for this exercise we will use four bins: A, B, C, and D. We use two techniques to stratify customers. The first technique involves using the Pareto principal, and the second involves using fractiles. We will review the first technique in this chapter, and then in Chapter 5, Working Capital Perspective, we will review the second technique.

Pareto analysis

Pareto analysis is based on the principle that most of the effects come from a few causes. For example, most sales come from a few customers, most complaints come from a few users and most gross profit come from a few products. Another name for this analysis is the 80-20 rule, which refers to the rule of thumb that, for example, 80% of sales come from 20% of customers. However, it is important to note that the exact percentages may vary.

We can visualize this phenomena using the following visualization. Each bar represents the twelve-month rolling net sales of one customer. The customers are sorted from greatest to least and their names appear along a line that represents the accumulation of their sales. The customers whose names appear below the horizontal reference line called 80% total sales line make up 80% of the total company's twelve-month rolling net sales. These are the customers in which we want to dedicate more of our time to provide great service:

Pareto analysis

We also confirm that we don't depend on too few customers by including a reference line that represents 20% of the total number of active customers. While the exact percentage depends on the business, we usually hope to have 20% or more of our customers make up 80% of our sales. The preceding chart clearly shows whether this is true by verifying that the accumulated sales line crosses the 80% total sales reference line to the right of where the 20% total customers reference line does.

Exercise 2.2

Let's construct this chart in Sales_Perspective_Sandbox.qvw using the following chart properties. These are only the principal chart properties that are necessary to create the chart. Adjust the color, number format, font, and text size as you like:

Chart Properties

Value

General / Chart Type

Choose to create a combo chart.

Dimensions / Used Dimensions

Use the following code to create a calculated dimension labeled Customers:

=aggr(rank(sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales]),4)/count({$<$(vSetRolling12Modifier),_ActualFlag={1}>} Total Customer),Customer)

Expressions

Use the following code to create an expression labeled Rolling 12-Month Net Sales:

sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales])

Choose to display the expression as a bar:

Expressions

Use the following code to create an expression labeled Accumulated Net Sales:

sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales]) 

Choose to display the expression as a line and enable the Full Accumulation option.

Expressions

Use the following code to create an expression labeled Customer:

if(
  sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales])
  /sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} Total [Net Sales])
  
>=.05,
  
Customer,
''
)

Choose to display the expression as Values on Data Points.

Axes / Dimension Axis

Choose to Continuous option in the Dimension Axis section.

Presentation / Reference Lines

Use the following code to create a reference line labeled 80% Total Sales:

=sum({$<$(vSetRolling12Modifier),_ActualFlag
={1}>} [Net Sales])*.8 

Choose the option to Show Label in Chart and the option to locate it on the Primary Y axis.

Presentation / Reference Lines

Use the following code to create a reference line labeled 20% Total Customers:

=.2

Choose the option to Show Label in Chart and the option to locate it on the Continuous X axis.

We avoid overlapping labels on the data points by adding some intelligence into the expression called Customer and only show the label when the customer's sales participation is greater than 5%.

While this is a powerful visualization, we simplify customer stratification for our sales representatives and assign each customer a particular letter according to how they are ranked as per the Pareto analysis. Those that are assigned the letter A are our most important customers, while those that are assigned the letter D are our least important customers. The following table details how we assign each letter to our customers:

Assigned Letter

Accumulated Sales Percentage

A

0-50%

B

50-80%

C

80-95%

D

95-100%

If we use the chart accumulation options like in the previous exercise or other methods like inter-row chart functions to determine which group each customer belongs to, we are forced to always show every customer. If we select any customer or apply any other filter then we lose how that customer is classified. In order to assign a letter to each customer and view their classification in any context, we use a method that uses alternate states. Let's perform the following tasks to classify our customers based on rolling twelve-month net sales.

Tip

This method was first introduced by Christof Schwarz in the Qlik Community (https://community.qlik.com/docs/DOC-6088).

Exercise 2.3

Perform the following steps for this exercise:

  1. Create an Input Box that contains three new variables: vPctSalesA, vPctSalesB, and vPctSalesC. Assign the values 50%, 80%, and 95% to each variable, respectively.
  2. In Settings -> Document Properties, click Alternate States… in the General tab. Add three new alternate states: A_CustomerSales, AB_CustomerSales, and ABC_CustomerSales.
  3. Create a button named Calculate Stratification with the following actions:

    Actions

    Values

    Copy State Contents

    We leave the Source State empty and use the following Target State:

    A_CustomerSales

    Pareto Select

    We will use the following field:

    Customer

    We will use the following expression:

    sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales])

    We will use the following percentage:

    =vPctSalesA

    We will use the following alternate state:

    A_CustomerSales

    Copy State Contents

    We leave the Source State empty and use the following Target State:

    AB_CustomerSales

    Pareto Select

    We will use the following field:

    Customer

    We will use the following expression:

    sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales]) 

    We will use the following percentage:

    =vPctSalesB

    We will use the following alternate state:

    AB_CustomerSales

    Copy State Contents

    We leave the Source State empty and use the following Target State:

    ABC_CustomerSales

    Pareto Select

    We will use the following field:

    Customer

    We will use the following expression:

    sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales]) 

    We will use the following percentage:

    =vPctSalesC 

    We will use the following alternate state:

    ABC_CustomerSales

  4. Finally, create a straight table with Customer as the dimension and the following two expressions:

    Label

    Expression

    Rolling 12-month net sales

    =sum({$<$(vSetRolling12Modifier),_ActualFlag={1}>} [Net Sales USD]) 

    Classif.

    aggr(if(len(only({A_CustomerSales} Customer)) <> 0, 'A',
      if(len(only({AB_CustomerSales} Customer)) <> 0, 'B',
      if(len(only({ABC_CustomerSales} Customer)) <> 0, 'C',
    if(len(only(Customer)) <> 0,'D'))))
    ,Customer)

  5. Optionally, add a background color that corresponds to each letter with the following expression:
    if(len(only({A_CustomerSales} Customer)) <> 0, blue(100),
      if(len(only({AB_CustomerSales} Customer)) <> 0, blue(75),
      if(len(only({ABC_CustomerSales} Customer)) <> 0, blue(50),blue(25)))))  

After some final adjustments to each object's presentation, we should have something similar to the following figure:

Exercise 2.3

Using this method we can select any customer and still observe how it is classified. We can perform this same stratification technique using other additive metrics, such as gross profit. Also, instead of customers, we can also stratify items or sales representatives.

The second part of stratification involves using nonadditive metrics. For example, we cannot use the Pareto principal to classify customers based on the average number of days they their invoices. In Chapter 5, Working Capital Perspective we will review how we can classify customers using fractiles and create a visualization that gives us a general overview of how they are stratified.

Sales representatives can now easily see which customers have the most impact on sales and dedicate more time to provide them with better service. At the same time, they need to avoid losing these customers. So let's take a look at how we can help them anticipate customer churn.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset