'how to calculate retention rate given what subs_period could be > 1?

I have dataset:

user_id date price amount subs_period country
243454 2021-02-11 14:42:11 24.99 280 12 USA
244324 2021-02-13 11:12:42 24.99 24.99 1 India

date - date subscription
price - price on 1 month subscription
amount - total sum (price*month-%discont)
subs_period - n-month subscription

Users can subscribe for multiple periods ahead.

how to take into account a subscription for several periods when calculating ratention rate?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source