Tableau - Customer Cohorts

The Task is to find the % of sales each year from new and old customers

Step 1: Create a new LOD calculated field in Tableau called "First Purchase Date" and type

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

Step 2: Add "OrderDate" to the column shelf, "First Purchase Date" to color and "Sales" to the row shelf

Step 3: For SUM(Sales) in the row shelf, right click and select Add Table Calculation with the following options:

  • Calculation Type: Percentage of Total
  • Compute using: Table (down)

You can now see the percentage of sales for each customer cohort.

Tip: To get a more granular view of sales, expand YEAR(Order Date) to view order dates by quarter and month.

Dash-Intel is a Power BI and Tableau resource site for data visualization and building BI dashboards.

Data Analyst & Consultant

Copyright 2015-2023 Terms