MIP Logo

How Many Customers Are Returning?

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Today I will share with you another Fixed LOD on cohort analysis.

Cohort analysis is a statistical technique used to examine and compare the behaviour of groups of individuals, called “cohorts,” over a certain period. It is often used in business and marketing to understand how different groups of customers or users interact with a product or service, and how their behaviour changes over time.

We will resolve two questions here.

1. How many customers do we have per cohort?
2. How many customers in the 2019 cohort purchased in 2022?

 

Let’s start with the Sample-Superstore dataset

The first step is to create a calculation field on the customers’ first order date.

{ FIXED [Customer Name]:MIN([Order Date])}

 

 

The second step is to create the cohort analysis table

1. right-click and hold the order date to the Columns shelf, and select the Year (Discrete).

2. right-click and hold the first purchase date to the Rows shelf, and select the Year (Discrete).

3. right-click and hold the customer name to the View, and select Count Distinct.

 

 

The third step is to go to the Analytics Pane, and drag the totals to the View and select the Rows Grand Total.

 

The table is ready to answer the questions now

1. How many customers do we have per cohort?

We have 605 customers in the 2019 cohort, 131 customers in the 2020 cohort, 53 customers in the 2021 cohort and 11 customers in the 2022 cohort.

2. How many customers in the 2019 cohort purchased in 2022?

The answer is 527 customers.

 

Share this post