1 of 1 people found this helpful
See #2 at the practical examples here -- in it, you calculate a Cohort year, and once the viz is finalized, you can use COUNTD(ID) on label, and then a % difference Table Calculation to compute churn/retention year over year.
I hope it helps give you some direction - sorry I don't have more time to dig in right now.
Check in the attached if it's what you are looking for.
First the ValidateData sheet is a duplicate of the Churn sheet on which I applied the following modifications;
- Set the computing on Churn - rigth-click - Edit Table Calculation - Specific Dimensions - check[Nome do cliente] and [Data da compra] - Deepest -Restarting every Nome do cliente.
- Add Next_Purchase for validation and set the same computing
- Next I moved Data da compra to the left of Nome do cliente.
- Compute the SUM of Churn per Date with WINDOW_SUM( [Churn] ). Now this is a nested table calculation and you need to have a different computing on the Next_Purchase part (which is the same computing as above), but on the Churn(winSum) you need to put [Data da compra] and [Nome do cliente] in the inverse order than in the Next_Purchase computation. You can switch the order by simply dragging the Specific Dimensions to move them up and down. And finally, restart every Nome do cliente.
You can see that each row gets the Date Total Churn.
-Compute a filter to show a single row for each date with index() = 1, and apply the same computation as Churn(winSum). (Data..,Nome.. , restart every Data...)
The final view is a duplicate of the ValidateData sheet with the following modifications;
-Move Keep a single row per Date on the filter shelf and keep the true values
-Remove Next_Purchase Dimension
-Keep only the Churn(winSum) measure
-Right-click Nome do cliente and unselect Show Header
Churn_Base(mc).twbx 2.3 MB
Thanks for the help Matt Lutton
God Morning Michel Caissie,
It was exactly the calculation I need, thank you very much for the help