Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview
# Description Changes: * Adds Revenue Churn Rate in YTD/MTD Overview. This has several implications, I finally understood how to properly compute a YTD. The problem is that Revenue Churn Rate is a % of the Total "Churned" Revenue in a 12 m period vs. the Total Revenue in the same 12 m period. This is a bit tricky because it's not really additive, because of the Churn definition. Total Churned Revenue is the Revenue that the churned deals in a month generated on that past 12 months prior to churning. So - in order to aggregate it properly, we need to do the sum of the Total Churned Revenue and retrieve the Total Revenue on these 12 months, and THEN compute the Churn rate. This PR mainly retrieves the necessary input from the Churn models and then follows a similar computation as for the rest of YTD/MTD converted metrics. I'll handle Onboarding MRR in a separated PR as this one is quite dense already. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #27609, #27805
This commit is contained in:
parent
78d42462a8
commit
a6671ee4d0
7 changed files with 446 additions and 89 deletions
|
|
@ -18,7 +18,15 @@ with
|
|||
-- Keep all history for the rest of metrics
|
||||
or requires_invoicing_data = false
|
||||
)
|
||||
-- To do: handle exclusion for Churn/MRR metrics once these are created
|
||||
-- Handle exclusion for Churn/MRR metrics: do not show them in the current
|
||||
-- month.
|
||||
and not (
|
||||
(
|
||||
lower(metric_name) like '%revenue%churn%rate%'
|
||||
or lower(metric_name) like '%onboarding%mrr%'
|
||||
)
|
||||
and date_trunc('month', "date") = date_trunc('month', current_date)
|
||||
)
|
||||
group by dimension, financial_year, id_metric
|
||||
)
|
||||
select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue