4 Replies Latest reply on May 17, 2018 4:46 AM by Danilo Carvalho

# Cálculo Churn

Good afternoon!

I would like some help to do a churn calculation on Tableau.

I need to calculate the amount of retained clients per date, ie in the attached example all records that have a month in sequence is considered to be a value of 1, but I need to have a view of the sum of those records grouped by date.

• ###### 1. Re: Cálculo Churn

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.

Happy analyzing!

Matt

1 of 1 people found this helpful
• ###### 2. Re: Cálculo Churn

Danilo,

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

Michel

1 of 1 people found this helpful
• ###### 3. Re: Cálculo Churn

Thanks for the help Matt Lutton

• ###### 4. Re: Cálculo Churn

God Morning Michel Caissie,

It was exactly the calculation I need, thank you very much for the help