New expected MRR metric
This commit is contained in:
parent
6dcfe03b30
commit
39de8617b7
2 changed files with 40 additions and 3 deletions
|
|
@ -308,6 +308,15 @@
|
||||||
{
|
{
|
||||||
"order_by": 203,
|
"order_by": 203,
|
||||||
"metric": "Expected Onboarding MRR per New Account",
|
"metric": "Expected Onboarding MRR per New Account",
|
||||||
|
"value": "expected_mrr_per_account",
|
||||||
|
"previous_year_value": "previous_year_expected_mrr_per_account",
|
||||||
|
"relative_increment": "relative_increment_expected_mrr_per_account",
|
||||||
|
"number_format": "currency_gbp",
|
||||||
|
"increment_sign_format": "positive",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order_by": 204,
|
||||||
|
"metric": "Expected Onboarding MRR",
|
||||||
"value": "expected_mrr",
|
"value": "expected_mrr",
|
||||||
"previous_year_value": "previous_year_expected_mrr",
|
"previous_year_value": "previous_year_expected_mrr",
|
||||||
"relative_increment": "relative_increment_expected_mrr",
|
"relative_increment": "relative_increment_expected_mrr",
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,11 @@ with
|
||||||
}} as revenue_retained_post_resolutions_ratio,
|
}} as revenue_retained_post_resolutions_ratio,
|
||||||
|
|
||||||
-- ONBOARDING MRR METRIC --
|
-- ONBOARDING MRR METRIC --
|
||||||
onboarding_mrr.expected_mrr as expected_mrr
|
onboarding_mrr.expected_mrr as expected_mrr_per_account,
|
||||||
|
case
|
||||||
|
when d.dimension = 'by_number_of_listings' then
|
||||||
|
onboarding_mrr.expected_mrr * deals.new_deals else null
|
||||||
|
end as number_of_listings_expected_mrr
|
||||||
|
|
||||||
from int_kpis__agg_dates_main_kpis d
|
from int_kpis__agg_dates_main_kpis d
|
||||||
left join
|
left join
|
||||||
|
|
@ -496,7 +500,30 @@ with
|
||||||
on d.date = onboarding_mrr.date
|
on d.date = onboarding_mrr.date
|
||||||
and d.dimension = onboarding_mrr.dimension
|
and d.dimension = onboarding_mrr.dimension
|
||||||
and d.dimension_value = onboarding_mrr.dimension_value
|
and d.dimension_value = onboarding_mrr.dimension_value
|
||||||
|
),
|
||||||
|
global_expected_mrr as (
|
||||||
|
select
|
||||||
|
pkc.year,
|
||||||
|
pkc.month,
|
||||||
|
pkc.day,
|
||||||
|
'global' as dimension,
|
||||||
|
sum(pkc.new_deals*pkc.expected_mrr_per_account) as global_expected_mrr
|
||||||
|
from plain_kpi_combination pkc
|
||||||
|
where
|
||||||
|
pkc.dimension = 'by_number_of_listings'
|
||||||
|
group by 1, 2, 3, 4
|
||||||
|
),
|
||||||
|
plain_kpi_combination_with_mrr as (
|
||||||
|
select
|
||||||
|
pkc.*,
|
||||||
|
coalesce(gem.global_expected_mrr, pkc.number_of_listings_expected_mrr) as expected_mrr
|
||||||
|
from plain_kpi_combination pkc
|
||||||
|
left join global_expected_mrr gem on pkc.year = gem.year
|
||||||
|
and pkc.month = gem.month
|
||||||
|
and pkc.day = gem.day
|
||||||
|
and pkc.dimension = gem.dimension
|
||||||
)
|
)
|
||||||
|
|
||||||
select
|
select
|
||||||
current.year,
|
current.year,
|
||||||
current.month,
|
current.month,
|
||||||
|
|
@ -636,11 +663,12 @@ select
|
||||||
{{ calculate_safe_relative_increment("revenue_retained_post_resolutions_ratio") }},
|
{{ calculate_safe_relative_increment("revenue_retained_post_resolutions_ratio") }},
|
||||||
|
|
||||||
-- ONBOARDING MRR METRIC --
|
-- ONBOARDING MRR METRIC --
|
||||||
|
{{ calculate_safe_relative_increment("expected_mrr_per_account") }},
|
||||||
{{ calculate_safe_relative_increment("expected_mrr") }}
|
{{ calculate_safe_relative_increment("expected_mrr") }}
|
||||||
|
|
||||||
from plain_kpi_combination current
|
from plain_kpi_combination_with_mrr current
|
||||||
left join
|
left join
|
||||||
plain_kpi_combination previous_year
|
plain_kpi_combination_with_mrr previous_year
|
||||||
on current.dimension = previous_year.dimension
|
on current.dimension = previous_year.dimension
|
||||||
and current.dimension_value = previous_year.dimension_value
|
and current.dimension_value = previous_year.dimension_value
|
||||||
and current.month = previous_year.month
|
and current.month = previous_year.month
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue