I'm trying to calculate the total number of subscriptions (new and old) that belong to a relationship id if this relationship id has a new inflow subscription.
I want to make the following calculation:
Inflow CLV-value = (sum (CLV-value)) * (# inflow_relationship_ids / # active subscriptions belonging to these relationship id's).
I cannot solve the problem of calculating the total # active subscriptions belonging to the inflow relationship ID's. Thus, if a relationship has a new inflow subscription in a certain week I need to count all the subscriptions that this specific relationship has (new inflow ids but also older already existing ones).
relationship x has a new inflow subscription in week y, namely subscription A. But relationship X is already active with 2 other subscriptions, namely subscription B and subscription C.
CLV of relationship x = 900€.
# Relationship = 1
# Subscriptions = 3
Then Inflow CLV-value = 900 * (1/3) = 300.