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.

 

The Data School
Author: The Data School