Complete the Tableau calculation to assign each customer to their cohort month based on their first purchase date.
DATETRUNC('month', [1])
The cohort month is based on the customer's first purchase date, so we use First Purchase Date in the DATETRUNC function.
Complete the Tableau calculation to find the number of months since the cohort month for each transaction.
DATEDIFF('month', [1], [Order Date])
We calculate months since cohort by comparing the Cohort Month to the current order date.
Fix the error in this cohort retention calculation to count distinct customers who made a purchase in the current month since their cohort.
COUNTD(IF [1] = 0 THEN [Customer ID] END)
The condition should check if Months Since Cohort equals zero to identify customers in their first month.
Fill both blanks to calculate the retention rate as the ratio of customers active in the current month to those in the cohort month.
SUM(IF [1] >= 0 THEN 1 ELSE 0 END) / SUM(IF [2] = 0 THEN 1 ELSE 0 END)
Retention rate compares customers active from cohort month (months since cohort = 0) to those active in current or later months (months since cohort >= 0).
Fill all three blanks to create a cohort retention table calculation that resets at each cohort month and calculates retention percentage.
IF FIRST() = 0 THEN WINDOW_SUM(SUM([[1]])) / WINDOW_SUM(SUM([[2]])) ELSE PREVIOUS_VALUE(1) END * [3]
This calculation divides active customers by cohort customers, resets at each cohort, and multiplies by 100 to get a percentage.