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:
Oriol Roqué Paniagua 2025-02-25 09:41:28 +00:00
parent 78d42462a8
commit a6671ee4d0
7 changed files with 446 additions and 89 deletions

View file

@ -83,6 +83,14 @@ select
-- Amount of active months per deal used in the computation
preceding_months_count_by_deal,
-- Revenue pre-computation metrics for further aggregation downstream
coalesce(
avg_total_revenue_preceding_12_months, 0
) as avg_total_revenue_preceding_12_months,
coalesce(
avg_global_total_revenue_preceding_12_months, 0
) as avg_global_total_revenue_preceding_12_months,
-- AVERAGE APPROACH --
-- 12 months window sum of metric divided by amount of active months per deal
coalesce(

View file

@ -23,6 +23,22 @@ with
m12wc.date,
{{ dimension.dimension }} as dimension,
{{ dimension.dimension_value }} as dimension_value,
-- Revenue Churn 12m rolling window (absolute figures) --
sum(
case
when m12wc.deal_lifecycle_state in {{ churn_lifecycle_states }}
then m12wc.avg_total_revenue_preceding_12_months
else 0
end
) as total_revenue_churn_preceding_12_months,
-- Global Revenue 12m rolling window --
max(
m12wc.avg_global_total_revenue_preceding_12_months
) as total_revenue_global_preceding_12_months,
-- Churn Rates --
sum(
case
when m12wc.deal_lifecycle_state in {{ churn_lifecycle_states }}
@ -73,6 +89,8 @@ select
d.dimension_value,
d.is_end_of_month,
d.is_current_month,
c.total_revenue_churn_preceding_12_months,
c.total_revenue_global_preceding_12_months,
cast(
c.total_revenue_churn_average_contribution as numeric(19, 6)
) as total_revenue_churn_average_contribution,

View file

@ -333,6 +333,8 @@ with
) as total_revenue_per_listings_booked_in_month,
-- CHURN --
churn.total_revenue_churn_preceding_12_months,
churn.total_revenue_global_preceding_12_months,
churn.total_revenue_churn_average_contribution,
churn.created_bookings_churn_average_contribution,
churn.listings_booked_in_month_churn_average_contribution,
@ -582,6 +584,8 @@ select
}},
-- CHURN --
{{ calculate_safe_relative_increment("total_revenue_churn_preceding_12_months") }},
{{ calculate_safe_relative_increment("total_revenue_global_preceding_12_months") }},
{{ calculate_safe_relative_increment("total_revenue_churn_average_contribution") }},
{{
calculate_safe_relative_increment(

View file

@ -149,6 +149,16 @@
"previous_YTD": "-1*previous_ytd_xero_host_resolution_amount_paid_in_gbp",
"requires_invoicing_data": true,
},
{
"id_metric": 16,
"name": "Revenue Churn Rate",
"current_month_MTD": "current_month_mtd_total_revenue_churn_rate",
"previous_month_EOM": "previous_month_eom_total_revenue_churn_rate",
"previous_year_MTD": "previous_year_mtd_total_revenue_churn_rate",
"current_YTD": "current_ytd_total_revenue_churn_rate",
"previous_YTD": "previous_ytd_total_revenue_churn_rate",
"requires_invoicing_data": false,
},
] %}
with
int_ytd_mtd_main_metrics_overview as (

View file

@ -36,6 +36,10 @@ with
churning_deals as current_month_mtd_churning_deals,
live_deals as current_month_mtd_live_deals,
waiver_payments_in_gbp as current_month_mtd_waiver_payments_in_gbp,
total_revenue_churn_preceding_12_months
as current_month_mtd_total_revenue_churn_12m,
total_revenue_global_preceding_12_months
as current_month_mtd_total_revenue_global_12m,
-- Previous Year (12 months ago), Month To Date Metrics --
previous_year_total_revenue_in_gbp
@ -58,6 +62,10 @@ with
previous_year_live_deals as previous_year_mtd_live_deals,
previous_year_waiver_payments_in_gbp
as previous_year_mtd_waiver_payments_in_gbp,
previous_year_total_revenue_churn_preceding_12_months
as previous_year_mtd_total_revenue_churn_12m,
previous_year_total_revenue_global_preceding_12_months
as previous_year_mtd_total_revenue_global_12m,
-- Previous Month, End Of Month Metrics --
lag(total_revenue_in_gbp) over (
@ -95,7 +103,13 @@ with
) as previous_month_eom_live_deals,
lag(waiver_payments_in_gbp) over (
partition by dimension, dimension_value order by date
) as previous_month_eom_waiver_payments_in_gbp
) as previous_month_eom_waiver_payments_in_gbp,
lag(total_revenue_churn_preceding_12_months) over (
partition by dimension, dimension_value order by date
) as previous_month_eom_total_revenue_churn_12m,
lag(total_revenue_global_preceding_12_months) over (
partition by dimension, dimension_value order by date
) as previous_month_eom_total_revenue_global_12m
from int_mtd_vs_previous_year_metrics
where
@ -164,6 +178,16 @@ with
order by date
rows between unbounded preceding and current row
) as current_ytd_waiver_payments_in_gbp,
sum(current_month_mtd_total_revenue_churn_12m) over (
partition by financial_year, dimension, dimension_value
order by date
rows between unbounded preceding and current row
) as current_ytd_total_revenue_churn_12m,
sum(current_month_mtd_total_revenue_global_12m) over (
partition by financial_year, dimension, dimension_value
order by date
rows between unbounded preceding and current row
) as current_ytd_total_revenue_global_12m,
-- Specific treatment for live_deals as it is a counter
current_month_mtd_live_deals as current_ytd_live_deals,
@ -223,6 +247,16 @@ with
order by date
rows between unbounded preceding and current row
) as previous_ytd_waiver_payments_in_gbp,
sum(previous_year_mtd_total_revenue_churn_12m) over (
partition by financial_year, dimension, dimension_value
order by date
rows between unbounded preceding and current row
) as previous_ytd_total_revenue_churn_12m,
sum(previous_year_mtd_total_revenue_global_12m) over (
partition by financial_year, dimension, dimension_value
order by date
rows between unbounded preceding and current row
) as previous_ytd_total_revenue_global_12m,
-- Specific treatment for live_deals as it is a counter
previous_year_mtd_live_deals as previous_ytd_live_deals
@ -247,6 +281,9 @@ select
coalesce(current_month_mtd_waiver_payments_in_gbp, 0) / nullif(
current_month_mtd_billable_bookings, 0
) as current_month_mtd_waiver_revenue_per_billable_booking,
coalesce(current_month_mtd_total_revenue_churn_12m, 0) / nullif(
current_month_mtd_total_revenue_global_12m, 0
) as current_month_mtd_total_revenue_churn_rate,
-- Previous Year (12 months ago), Month To Date Metrics --
abs(coalesce(previous_year_mtd_xero_waiver_paid_back_to_host_in_gbp, 0)) / nullif(
@ -263,6 +300,9 @@ select
coalesce(previous_year_mtd_waiver_payments_in_gbp, 0) / nullif(
previous_year_mtd_billable_bookings, 0
) as previous_year_mtd_waiver_revenue_per_billable_booking,
coalesce(previous_year_mtd_total_revenue_churn_12m, 0) / nullif(
previous_year_mtd_total_revenue_global_12m, 0
) as previous_year_mtd_total_revenue_churn_rate,
-- Previous Month, End Of Month Metrics --
abs(coalesce(previous_month_eom_xero_waiver_paid_back_to_host_in_gbp, 0)) / nullif(
@ -279,6 +319,9 @@ select
coalesce(previous_month_eom_waiver_payments_in_gbp, 0) / nullif(
previous_month_eom_billable_bookings, 0
) as previous_month_eom_waiver_revenue_per_billable_booking,
coalesce(previous_month_eom_total_revenue_churn_12m, 0) / nullif(
previous_month_eom_total_revenue_global_12m, 0
) as previous_month_eom_total_revenue_churn_rate,
-- Current Financial Year, Year To Date Metrics --
abs(coalesce(current_ytd_xero_waiver_paid_back_to_host_in_gbp, 0))
@ -292,6 +335,9 @@ select
coalesce(current_ytd_waiver_payments_in_gbp, 0) / nullif(
current_ytd_billable_bookings, 0
) as current_ytd_waiver_revenue_per_billable_booking,
coalesce(current_ytd_total_revenue_churn_12m, 0) / nullif(
current_ytd_total_revenue_global_12m, 0
) as current_ytd_total_revenue_churn_rate,
-- Previous Financial Year, Year To Date Metrics --
abs(coalesce(previous_ytd_xero_waiver_paid_back_to_host_in_gbp, 0))
@ -304,6 +350,9 @@ select
) as previous_ytd_operator_revenue_per_billable_booking,
coalesce(previous_ytd_waiver_payments_in_gbp, 0) / nullif(
previous_ytd_billable_bookings, 0
) as previous_ytd_waiver_revenue_per_billable_booking
) as previous_ytd_waiver_revenue_per_billable_booking,
coalesce(previous_ytd_total_revenue_churn_12m, 0) / nullif(
previous_ytd_total_revenue_global_12m, 0
) as previous_ytd_total_revenue_churn_rate
from ytd_mtd_main_metrics_overview

View file

@ -1148,6 +1148,22 @@ models:
max_value: 1
strictly: false
- name: avg_total_revenue_preceding_12_months
data_type: numeric
description: |
Total revenue in GBP generated by a single deal
in the 12 months period. This uses an average approach,
meaning that the revenue of that deal is divided by the
amount of months it has been active.
- name: avg_global_total_revenue_preceding_12_months
data_type: numeric
description: |
Total revenue in GBP generated by a all deals
in the 12 months period. This uses an average approach,
meaning that the revenue of each deal is divided by the
amount of months it has been active.
- name: int_monthly_churn_metrics
description: |
This model is used for global KPIs.
@ -1204,6 +1220,17 @@ models:
data_tests:
- not_null
- name: total_revenue_churn_preceding_12_months
data_type: numeric
description: |
Total Revenue attributed to have churned considering the
revenue generated by the deals in the 12 months period.
- name: total_revenue_global_preceding_12_months
data_type: numeric
description: |
Total Revenue generated by all deals in the 12 months period.
- name: total_revenue_churn_average_contribution
data_type: numeric
description: Total Revenue churn rate (average approach).
@ -1822,13 +1849,15 @@ models:
columns:
- name: date
data_type: date
description: The date for the month-to-date and year-to-date metrics.
description: |
The date for the month-to-date and year-to-date metrics.
data_tests:
- not_null
- name: dimension
data_type: string
description: The dimension or granularity of the metrics.
description: |
The dimension or granularity of the metrics.
data_tests:
- accepted_values:
values:
@ -1836,341 +1865,572 @@ models:
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
description: |
The value or segment available for the selected dimension.
data_tests:
- not_null
- name: calendar_year
data_type: integer
description: The calendar year associated with the data.
description: |
The calendar year associated with the data.
- name: financial_year
data_type: integer
description: The financial year associated with the data.
description: |
The financial year associated with the data.
- name: previous_year_date
data_type: date
description: The equivalent date in the previous year.
description: |
The equivalent date in the previous year.
- name: current_month_mtd_billable_bookings
data_type: integer
description: Total billable bookings for the current month MTD.
description: |
Total billable bookings for the current month MTD.
- name: current_month_mtd_churning_deals
data_type: integer
description: Number of churning deals for the current month MTD.
description: |
Number of churning deals for the current month MTD.
- name: current_month_mtd_live_deals
data_type: integer
description: Number of live deals for the current month MTD.
description: |
Number of live deals for the current month MTD.
- name: current_month_mtd_new_deals
data_type: integer
description: Number of new deals for the current month MTD.
description: |
Number of new deals for the current month MTD.
- name: current_month_mtd_operator_revenue_per_billable_booking
data_type: numeric
description: Operator revenue per billable booking for the current month MTD.
description: |
Operator revenue per billable booking for the
current month MTD.
- name: current_month_mtd_resolutions_payout_rate
data_type: numeric
description: Resolutions payout rate for the current month MTD.
description: |
Resolutions payout rate for the current month MTD.
- name: current_month_mtd_revenue_retained_post_resolutions_in_gbp
data_type: numeric
description: Revenue retained after resolutions for the current month MTD in GBP.
description: |
Revenue retained after resolutions for the current
month MTD in GBP.
- name: current_month_mtd_total_guest_payments_in_gbp
data_type: numeric
description: Total guest payments for the current month MTD in GBP.
description: |
Total guest payments for the current month MTD in GBP.
- name: current_month_mtd_total_revenue_in_gbp
data_type: numeric
description: Total revenue for the current month MTD in GBP.
description: |
Total revenue for the current month MTD in GBP.
- name: current_month_mtd_waiver_payments_in_gbp
data_type: numeric
description: Total waiver payments made in GBP for the current month MTD.
description: |
Total waiver payments made in GBP for the current month MTD.
- name: current_month_mtd_waiver_payout_rate
data_type: numeric
description: Waiver payout rate for the current month MTD.
description: |
Waiver payout rate for the current month MTD.
- name: current_month_mtd_waiver_revenue_per_billable_booking
data_type: numeric
description: Waiver revenue per billable booking for the current month MTD.
description: |
Waiver revenue per billable booking for the current month MTD.
- name: current_month_mtd_xero_apis_net_fees_in_gbp
data_type: numeric
description: Net fees for APIs processed through Xero for the current month MTD in GBP.
description: |
Net fees for APIs processed through Xero for
the current month MTD in GBP.
- name: current_month_mtd_xero_host_resolution_amount_paid_in_gbp
data_type: numeric
description: Amount paid to hosts for resolutions processed through Xero for the current month MTD in GBP.
description: |
Amount paid to hosts for resolutions processed
through Xero for the current month MTD in GBP.
- name: current_month_mtd_xero_operator_net_fees_in_gbp
data_type: numeric
description: Net fees for operators processed through Xero for the current month MTD in GBP.
description: |
Net fees for operators processed through Xero
for the current month MTD in GBP.
- name: current_month_mtd_xero_waiver_paid_back_to_host_in_gbp
data_type: numeric
description: Waiver amounts paid back to hosts via Xero for the current month MTD in GBP.
description: |
Waiver amounts paid back to hosts via Xero
for the current month MTD in GBP.
- name: current_month_mtd_total_revenue_churn_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by
deals that have churned in the current month MTD.
- name: current_month_mtd_total_revenue_global_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by any
deal, indistinctly of it being active, churn, etc. for the
current month MTD. This is only used to compute the churn rate.
- name: current_month_mtd_total_revenue_churn_rate
data_type: numeric
description: |
Total revenue churn rate for the current month MTD.
- name: previous_year_mtd_billable_bookings
data_type: integer
description: Total billable bookings for the previous year (12 months ago) MTD.
description: |
Total billable bookings for the previous year (12 months ago) MTD.
- name: previous_year_mtd_churning_deals
data_type: integer
description: Number of churning deals for the previous year (12 months ago) MTD.
description: |
Number of churning deals for the previous year (12 months ago) MTD.
- name: previous_year_mtd_live_deals
data_type: integer
description: Number of live deals for the previous year (12 months ago) MTD.
description: |
Number of live deals for the previous year (12 months ago) MTD.
- name: previous_year_mtd_new_deals
data_type: integer
description: Number of new deals for the previous year (12 months ago) MTD.
description: |
Number of new deals for the previous year (12 months ago) MTD.
- name: previous_year_mtd_operator_revenue_per_billable_booking
data_type: numeric
description: Operator revenue per billable booking for the previous year (12 months ago) MTD.
description: |
Operator revenue per billable booking for the
previous year (12 months ago) MTD.
- name: previous_year_mtd_resolutions_payout_rate
data_type: numeric
description: Resolutions payout rate for the previous year (12 months ago) MTD.
description: |
Resolutions payout rate for the previous year
(12 months ago) MTD.
- name: previous_year_mtd_revenue_retained_post_resolutions_in_gbp
data_type: numeric
description: Revenue retained after resolutions for the previous year (12 months ago) MTD in GBP.
description: |
Revenue retained after resolutions for the previous year
(12 months ago) MTD in GBP.
- name: previous_year_mtd_total_guest_payments_in_gbp
data_type: numeric
description: Total guest payments for the previous year (12 months ago) MTD in GBP.
description: |
Total guest payments for the previous year (12 months ago)
MTD in GBP.
- name: previous_year_mtd_total_revenue_in_gbp
data_type: numeric
description: Total revenue for the previous year (12 months ago) MTD in GBP.
description: |
Total revenue for the previous year (12 months ago) MTD in GBP.
- name: previous_year_mtd_waiver_payments_in_gbp
data_type: numeric
description: Total waiver payments made in GBP for the previous year (12 months ago) MTD.
description: |
Total waiver payments made in GBP for the previous
year (12 months ago) MTD.
- name: previous_year_mtd_waiver_payout_rate
data_type: numeric
description: Waiver payout rate for the previous year (12 months ago) MTD.
description: |
Waiver payout rate for the previous year (12 months ago) MTD.
- name: previous_year_mtd_waiver_revenue_per_billable_booking
data_type: numeric
description: Waiver revenue per billable booking for the previous year (12 months ago) MTD.
description: |
Waiver revenue per billable booking for the
previous year (12 months ago) MTD.
- name: previous_year_mtd_xero_apis_net_fees_in_gbp
data_type: numeric
description: Net fees for APIs processed through Xero for the previous year (12 months ago) MTD in GBP.
description: |
Net fees for APIs processed through Xero for the
previous year (12 months ago) MTD in GBP.
- name: previous_year_mtd_xero_host_resolution_amount_paid_in_gbp
data_type: numeric
description: Amount paid to hosts for resolutions processed through Xero for the previous year (12 months ago) MTD in GBP.
description: |
Amount paid to hosts for resolutions processed through
Xero for the previous year (12 months ago) MTD in GBP.
- name: previous_year_mtd_xero_operator_net_fees_in_gbp
data_type: numeric
description: Net fees for operators processed through Xero for the previous year (12 months ago) MTD in GBP.
description: |
Net fees for operators processed through Xero for the
previous year (12 months ago) MTD in GBP.
- name: previous_year_mtd_xero_waiver_paid_back_to_host_in_gbp
data_type: numeric
description: Waiver amounts paid back to hosts via Xero for the previous year (12 months ago) MTD in GBP.
description: |
Waiver amounts paid back to hosts via Xero for the
previous year (12 months ago) MTD in GBP.
- name: previous_year_mtd_total_revenue_churn_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by
deals that have churned in the previous year
(12 months ago) MTD.
- name: previous_year_mtd_total_revenue_global_12m
data_type: numeric
description: |
Total revenue generated globally in the last 12 months
for the previous year (12 months ago) MTD.
This is only used to compute the churn rate.
- name: previous_year_mtd_total_revenue_churn_rate
data_type: numeric
description: |
Total revenue churn rate for the previous year
(12 months ago) MTD.
- name: current_ytd_billable_bookings
data_type: integer
description: Total billable bookings for the current financial year YTD.
description: |
Total billable bookings for the current financial year YTD.
- name: current_ytd_churning_deals
data_type: integer
description: Number of churning deals for the current financial year YTD.
description: |
Number of churning deals for the current financial year YTD.
- name: current_ytd_live_deals
data_type: integer
description: Number of live deals for the current financial year YTD.
description: |
Number of live deals for the current financial year YTD.
- name: current_ytd_new_deals
data_type: integer
description: Number of new deals for the current financial year YTD.
description: |
Number of new deals for the current financial year YTD.
- name: current_ytd_operator_revenue_per_billable_booking
data_type: numeric
description: Operator revenue per billable booking for the current financial year YTD.
description: |
Operator revenue per billable booking for the current
financial year YTD.
- name: current_ytd_resolutions_payout_rate
data_type: numeric
description: Resolutions payout rate for the current financial year YTD.
description: |
Resolutions payout rate for the current financial year YTD.
- name: current_ytd_revenue_retained_post_resolutions_in_gbp
data_type: numeric
description: Revenue retained after resolutions for the current financial year YTD in GBP.
description: |
Revenue retained after resolutions for the current
financial year YTD in GBP.
- name: current_ytd_total_guest_payments_in_gbp
data_type: numeric
description: Total guest payments for the current financial year YTD in GBP.
description: |
Total guest payments for the current financial year
YTD in GBP.
- name: current_ytd_total_revenue_in_gbp
data_type: numeric
description: Total revenue for the current financial year YTD in GBP.
description: |
Total revenue for the current financial year YTD in GBP.
- name: current_ytd_waiver_payments_in_gbp
data_type: numeric
description: Total waiver payments made in GBP for the current financial year YTD.
description: |
Total waiver payments made in GBP for the current
financial year YTD.
- name: current_ytd_waiver_payout_rate
data_type: numeric
description: Waiver payout rate for the current financial year YTD.
description: |
Waiver payout rate for the current financial year YTD.
- name: current_ytd_waiver_revenue_per_billable_booking
data_type: numeric
description: Waiver revenue per billable booking for the current financial year YTD.
description: |
Waiver revenue per billable booking for the current
financial year YTD.
- name: current_ytd_xero_apis_net_fees_in_gbp
data_type: numeric
description: Net fees for APIs processed through Xero for the current financial year YTD in GBP.
description: |
Net fees for APIs processed through Xero for
the current financial year YTD in GBP.
- name: current_ytd_xero_host_resolution_amount_paid_in_gbp
data_type: numeric
description: Amount paid to hosts for resolutions processed through Xero for the current financial year YTD in GBP.
description: |
Amount paid to hosts for resolutions processed through
Xero for the current financial year YTD in GBP.
- name: current_ytd_xero_operator_net_fees_in_gbp
data_type: numeric
description: Net fees for operators processed through Xero for the current financial year YTD in GBP.
description: |
Net fees for operators processed through Xero
for the current financial year YTD in GBP.
- name: current_ytd_xero_waiver_paid_back_to_host_in_gbp
data_type: numeric
description: Waiver amounts paid back to hosts via Xero for the current financial year YTD in GBP.
description: |
Waiver amounts paid back to hosts via Xero
for the current financial year YTD in GBP.
- name: current_ytd_total_revenue_churn_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by
deals that have churned in the period of the current
financial year YTD.
- name: current_ytd_total_revenue_global_12m
data_type: numeric
description: |
Total revenue generated globally in the last 12 months
for the current financial year YTD.
This is only used to compute the churn rate.
- name: current_ytd_total_revenue_churn_rate
data_type: numeric
description: |
Total revenue churn rate for the current financial year YTD.
- name: previous_ytd_billable_bookings
data_type: integer
description: Total billable bookings for the previous financial year YTD.
description: |
Total billable bookings for the previous financial year YTD.
- name: previous_ytd_churning_deals
data_type: integer
description: Number of churning deals for the previous financial year YTD.
description: |
Number of churning deals for the previous financial
year YTD.
- name: previous_ytd_live_deals
data_type: integer
description: Number of live deals for the previous financial year YTD.
description: |
Number of live deals for the previous financial year YTD.
- name: previous_ytd_new_deals
data_type: integer
description: Number of new deals for the previous financial year YTD.
description: |
Number of new deals for the previous financial year YTD.
- name: previous_ytd_operator_revenue_per_billable_booking
data_type: numeric
description: Operator revenue per billable booking for the previous financial year YTD.
description: |
Operator revenue per billable booking for the previous
financial year YTD.
- name: previous_ytd_resolutions_payout_rate
data_type: numeric
description: Resolutions payout rate for the previous financial year YTD.
description: |
Resolutions payout rate for the previous financial year YTD.
- name: previous_ytd_revenue_retained_post_resolutions_in_gbp
data_type: numeric
description: Revenue retained after resolutions for the previous financial year YTD in GBP.
description: |
Revenue retained after resolutions for the previous
financial year YTD in GBP.
- name: previous_ytd_total_guest_payments_in_gbp
data_type: numeric
description: Total guest payments for the previous financial year YTD in GBP.
description: |
Total guest payments for the previous financial year YTD in GBP.
- name: previous_ytd_total_revenue_in_gbp
data_type: numeric
description: Total revenue for the previous financial year YTD in GBP.
description: |
Total revenue for the previous financial year YTD in GBP.
- name: previous_ytd_waiver_payments_in_gbp
data_type: numeric
description: Total waiver payments made in GBP for the previous financial year YTD.
description: |
Total waiver payments made in GBP for the previous
financial year YTD.
- name: previous_ytd_waiver_payout_rate
data_type: numeric
description: Waiver payout rate for the previous financial year YTD.
description: |
Waiver payout rate for the previous financial year YTD.
- name: previous_ytd_waiver_revenue_per_billable_booking
data_type: numeric
description: Waiver revenue per billable booking for the previous financial year YTD.
description: |
Waiver revenue per billable booking for
the previous financial year YTD.
- name: previous_ytd_xero_apis_net_fees_in_gbp
data_type: numeric
description: Net fees for APIs processed through Xero for the previous financial year YTD in GBP.
description: |
Net fees for APIs processed through Xero
for the previous financial year YTD in GBP.
- name: previous_ytd_xero_host_resolution_amount_paid_in_gbp
data_type: numeric
description: Amount paid to hosts for resolutions processed through Xero for the previous financial year YTD in GBP.
description: |
Amount paid to hosts for resolutions processed
through Xero for the previous financial year YTD in GBP.
- name: previous_ytd_xero_operator_net_fees_in_gbp
data_type: numeric
description: Net fees for operators processed through Xero for the previous financial year YTD in GBP.
description: |
Net fees for operators processed through Xero
for the previous financial year YTD in GBP.
- name: previous_ytd_xero_waiver_paid_back_to_host_in_gbp
data_type: numeric
description: Waiver amounts paid back to hosts via Xero for the previous financial year YTD in GBP.
description: |
Waiver amounts paid back to hosts via Xero
for the previous financial year YTD in GBP.
- name: previous_ytd_total_revenue_churn_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by
deals that have churned in the period of the previous
financial year YTD.
- name: previous_ytd_total_revenue_global_12m
data_type: numeric
description: |
Total revenue generated globally in the last 12 months
for the previous financial year YTD.
This is only used to compute the churn rate.
- name: previous_ytd_total_revenue_churn_rate
data_type: numeric
description: |
Total revenue churn rate for the previous
financial year YTD.
- name: previous_month_eom_billable_bookings
data_type: integer
description: Total billable bookings for the previous month, at the end of the month.
description: |
Total billable bookings for the previous month,
at the end of the month.
- name: previous_month_eom_churning_deals
data_type: integer
description: Number of churning deals for the previous month, at the end of the month.
description: |
Number of churning deals for the previous month,
at the end of the month.
- name: previous_month_eom_live_deals
data_type: integer
description: Number of live deals for the previous month, at the end of the month.
description: |
Number of live deals for the previous month,
at the end of the month.
- name: previous_month_eom_new_deals
data_type: integer
description: Number of new deals for the previous month, at the end of the month.
description: |
Number of new deals for the previous month,
at the end of the month.
- name: previous_month_eom_operator_revenue_per_billable_booking
data_type: numeric
description: Operator revenue per billable booking for the previous month, at the end of the month.
description: |
Operator revenue per billable booking for
the previous month, at the end of the month.
- name: previous_month_eom_resolutions_payout_rate
data_type: numeric
description: Resolutions payout rate for the previous month, at the end of the month.
description: |
Resolutions payout rate for the previous month,
at the end of the month.
- name: previous_month_eom_revenue_retained_post_resolutions_in_gbp
data_type: numeric
description: Revenue retained after resolutions for the previous month, at the end of the month in GBP.
description: |
Revenue retained after resolutions for the
previous month, at the end of the month in GBP.
- name: previous_month_eom_total_guest_payments_in_gbp
data_type: numeric
description: Total guest payments for the previous month, at the end of the month in GBP.
description: |
Total guest payments for the previous month,
at the end of the month in GBP.
- name: previous_month_eom_total_revenue_in_gbp
data_type: numeric
description: Total revenue for the previous month, at the end of the month in GBP.
description: |
Total revenue for the previous month, at the
end of the month in GBP.
- name: previous_month_eom_waiver_payments_in_gbp
data_type: numeric
description: Total waiver payments made in GBP for the previous month, at the end of the month.
description: |
Total waiver payments made in GBP for the previous
month, at the end of the month.
- name: previous_month_eom_waiver_payout_rate
data_type: numeric
description: Waiver payout rate for the previous month, at the end of the month.
description: |
Waiver payout rate for the previous month,
at the end of the month.
- name: previous_month_eom_waiver_revenue_per_billable_booking
data_type: numeric
description: Waiver revenue per billable booking for the previous month, at the end of the month.
description: |
Waiver revenue per billable booking for the previous month,
at the end of the month.
- name: previous_month_eom_xero_apis_net_fees_in_gbp
data_type: numeric
description: Net fees for APIs processed through Xero for the previous month, at the end of the month in GBP.
description: |
Net fees for APIs processed through Xero for the previous month,
at the end of the month in GBP.
- name: previous_month_eom_xero_host_resolution_amount_paid_in_gbp
data_type: numeric
description: Amount paid to hosts for resolutions processed through Xero for the previous month, at the end of the month in GBP.
description: |
Amount paid to hosts for resolutions processed through Xero for
the previous month, at the end of the month in GBP.
- name: previous_month_eom_xero_operator_net_fees_in_gbp
data_type: numeric
description: Net fees for operators processed through Xero for the previous month, at the end of the month in GBP.
description: |
Net fees for operators processed through Xero for the previous month,
at the end of the month in GBP.
- name: previous_month_eom_xero_waiver_paid_back_to_host_in_gbp
data_type: numeric
description: Waiver amounts paid back to hosts via Xero for the previous month, at the end of the month in GBP.
description: |
Waiver amounts paid back to hosts via Xero for the previous month,
at the end of the month in GBP.
- name: previous_month_eom_total_revenue_churn_12m
data_type: numeric
description: |
Total revenue in the last 12 months that was generated by
deals that have churned in the previous month, at the end of
the month, in GBP.
- name: previous_month_eom_total_revenue_global_12m
data_type: numeric
description: |
Total revenue generated globally in the last 12 months
for the previous month, at the end of the month.
This is only used to compute the churn rate.
- name: previous_month_eom_total_revenue_churn_rate
data_type: numeric
description: |
Total revenue churn rate for the previous month,
at the end of the month.
- name: int_ytd_mtd_aggregated_main_metrics_overview
description: |

View file

@ -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