How to track churn rate over time in a Tableau dashboard?

  • Tableau FAQs
  • December 13, 2018
Get Started Transforming Your Data in Snowflake

How do I create a trend line in Tableau to show the churn rate over the last 6 months that updates dynamically?

To calculate the churn line for the last 6 months, you can follow these steps:

1. First, we need to calculate sales for the last 6 months; for this, we need to use the WINDOW_SUM function and specify the offset:


37.01 Tableau

2. Next, you need to count the number of customers in the last 6 months:

if [Sales - Prior 6 Months]>0 then 1 else 0 end

37.02 Tableau

3. Then, you need to perform the same calculations for a 12-month interval:


37.03 Tableau


4. The same steps must be followed to find active clients in the last 12 months:

if [Sales - Prior 12 Months]>0 then 1 else 0 end

37.04 Tableau5. Now we have everything, and we can calculate the Churn Rate using the following formula:

1-(window_sum([Active Customer - 6 Month])/

window_sum([Active Customer - 12 Month]))


37.05 Tableau

6. In the end, you need to add all the necessary metrics to the bar chart, and as a result, you should get the following:

37.06 Tableau

Up Next:

Read How can I increase the size of the pie chart without changing its shape in a Tableau dashboard?