Forum Discussion

rflipper's avatar
rflipper
Frequent Visitor
7 years ago

MRR Churn calculation

 

 

Hello! 

I have a simple model with the following structure: 

Date | Subs | Income

 

I have the following code to calculate MRR for new customers. 

MRRNew = 
IF(
	ISFILTERED('transactions'[Date]);
	ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column.");
	VAR __CURRENT_VALUES = SUMMARIZE(VALUES('transactions'); 'transactions'[Subs])
	VAR __EXISTING_VALUES =
		CALCULATETABLE(
			SUMMARIZE(VALUES('transactions'); 'transactions'[Subs]);
			FILTER(
				ALL('transactions'[Date].[Date]);
				'transactions'[Date].[Date] < MIN('transactions'[Date].[Date])
			);
			KEEPFILTERS(__CURRENT_VALUES)
		)
	RETURN
		CALCULATE(
			SUM('transactions'[Income]);
			EXCEPT(__CURRENT_VALUES; __EXISTING_VALUES)
		)
)

 

 

Some additional info: 

MRR -  The Monthly Recurring Revenue at the end of each month. I can calculate it using SUM('transactions'[Income])

 

Churned MRR - The lost MRR from churning customers in the current month.

 

I wonder if anyone could help me to calculate churn MRR. As I understand I need to get all subscriptions from the last month and exclude subscriptions from the current month, but I cannot figure out how to do this correctly. 

 

 

Sample pbix file: 

https://cp.sync.com/dl/a1dac0e10#43rernz3-j8gp26nb-xtq47nde-sukfp6pz

 

 

 

 

 

4 Replies