Calculate % and store each month

I’m trying to calculate and store each of my customers churn & retention rates (% of their customers lost/retained).

Calculation is: Lost Customers ÷ Total Customers at the Start of Time Period) x 100

I understand how to set up a backend workflow to recalculate this, but what I’m not sure about is how to account for the dates.

It’s important that my customer can view a chart and change the date filter to view their churn rate over a specific time period.

For example, 12 month churn % might be 10%, but 6 months could be 2%.

Any ideas?

hey @jamie.robson.89 :wave:

If you want to provide your user a chart that they can play with, probably, you shouldn’t store these in the backend and do the calculation in the frontend depending on the filters and everything the user sets. And in order to do this, probably you need to keep track of customer movements (like when they are lost, when they registered etc) in a different data type so you can easily make calculations and extract charts out of it. I hope this gives you some starting point.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

1 Like

Thanks for the input.

I feel like going down the “Events” route might make sense, since there are quite a few others that I need to capture and report on.

The database could get quite large though, is there a better way to track events than creating a thing in the database each time?

You can keep each event in separate fields on the user like joined date (somehow exists like created, or left date etc. But these will only follow one thing per user. If they join only once etc.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.