Merged PR 3906: Adds 2 new retained income metrics
# Description It adds 2 new metrics in Main KPIs, both for Global/per Dimension and By Deal. If merged, metrics will NOT appear automatically in the Global/per Dimension nor in the By Deal. These two new metrics are: * Income Retained: Total Revenue - Waiver Paid Back to Host * Income Retained Post Resolutions: Total Revenue - Waiver Paid Back to Host - Host Resolutions Amount Paid Why these are important:  Even though we grow considerably in terms of Revenue, the gap of Waivers that we pay back to host is also increasing. Thus the "real" increment is actually lower. However, what I find more interesting is the heavy decrease in Income Retained Post Resolutions. Here's the Year-by-Year comparison:  In November 2024, we're back to the figures of 2023 (-0.4%) and this should be alarming considering we're growing in Total Revenue by 27% and in Retained Income by 41% vs. Nov 23. In terms of business impact, I'd opt for having these 2 metrics computed as these capture a reality that otherwise we keep hidden. Happy to discuss renames and how/if we move forward with this. # 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. Attached working excel with the extraction [20241227_retained_revenue_global.xlsx](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/3906/attachments/20241227_retained_revenue_global.xlsx) Related work items: #25804
This commit is contained in:
parent
d26e08bffd
commit
29a005297a
5 changed files with 82 additions and 7 deletions
|
|
@ -186,7 +186,26 @@ select
|
|||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
) / nullif(
|
||||
listings.listings_booked_in_month, 0
|
||||
) as total_revenue_per_listings_booked_in_month
|
||||
) as total_revenue_per_listings_booked_in_month,
|
||||
|
||||
-- INCOME RETAINED --
|
||||
nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0),
|
||||
0
|
||||
) as income_retained_in_gbp,
|
||||
|
||||
-- INCOME RETAINED POST RESOLUTIONS--
|
||||
nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0)
|
||||
+ coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0),
|
||||
0
|
||||
) as income_retained_post_resolutions_in_gbp
|
||||
|
||||
from int_kpis__agg_dates_main_kpis d
|
||||
left join int_core__deal icd on d.dimension_value = icd.id_deal
|
||||
|
|
|
|||
|
|
@ -262,6 +262,24 @@
|
|||
},
|
||||
{
|
||||
"order_by": 201,
|
||||
"metric": "Revenue Retained",
|
||||
"value": "revenue_retained_in_gbp",
|
||||
"previous_year_value": "previous_year_revenue_retained_in_gbp",
|
||||
"relative_increment": "relative_increment_revenue_retained_in_gbp",
|
||||
"number_format": "currency_gbp",
|
||||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 202,
|
||||
"metric": "Revenue Retained Post Resolutions",
|
||||
"value": "revenue_retained_post_resolutions_in_gbp",
|
||||
"previous_year_value": "previous_year_revenue_retained_post_resolutions_in_gbp",
|
||||
"relative_increment": "relative_increment_revenue_retained_post_resolutions_in_gbp",
|
||||
"number_format": "currency_gbp",
|
||||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 211,
|
||||
"metric": "Total Revenue per Booking Created",
|
||||
"value": "total_revenue_per_created_booking",
|
||||
"previous_year_value": "previous_year_total_revenue_per_created_booking",
|
||||
|
|
@ -270,7 +288,7 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 202,
|
||||
"order_by": 212,
|
||||
"metric": "Total Revenue per Guest Journey Created",
|
||||
"value": "total_revenue_per_created_guest_journey",
|
||||
"previous_year_value": "previous_year_total_revenue_per_created_guest_journey",
|
||||
|
|
@ -279,7 +297,7 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 203,
|
||||
"order_by": 213,
|
||||
"metric": "Total Revenue per Deals Booked in Month",
|
||||
"value": "total_revenue_per_deals_booked_in_month",
|
||||
"previous_year_value": "previous_year_total_revenue_per_deals_booked_in_month",
|
||||
|
|
@ -288,7 +306,7 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 204,
|
||||
"order_by": 214,
|
||||
"metric": "Total Revenue per Listings Booked in Month",
|
||||
"value": "total_revenue_per_listings_booked_in_month",
|
||||
"previous_year_value": "previous_year_total_revenue_per_listings_booked_in_month",
|
||||
|
|
|
|||
|
|
@ -311,7 +311,26 @@ with
|
|||
-- CHURN --
|
||||
churn.total_revenue_churn_average_contribution,
|
||||
churn.created_bookings_churn_average_contribution,
|
||||
churn.listings_booked_in_month_churn_average_contribution
|
||||
churn.listings_booked_in_month_churn_average_contribution,
|
||||
|
||||
-- INCOME RETAINED --
|
||||
nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0),
|
||||
0
|
||||
) as revenue_retained_in_gbp,
|
||||
|
||||
-- INCOME RETAINED POST RESOLUTIONS--
|
||||
nullif(
|
||||
coalesce(guest_payments.total_guest_payments_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_operator_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_apis_net_fees_in_gbp, 0)
|
||||
+ coalesce(invoiced_revenue.xero_waiver_paid_back_to_host_in_gbp, 0)
|
||||
+ coalesce(host_resolutions.xero_host_resolution_amount_paid_in_gbp, 0),
|
||||
0
|
||||
) as revenue_retained_post_resolutions_in_gbp
|
||||
|
||||
from int_kpis__agg_dates_main_kpis d
|
||||
left join
|
||||
|
|
@ -493,7 +512,13 @@ select
|
|||
calculate_safe_relative_increment(
|
||||
"listings_booked_in_month_churn_average_contribution"
|
||||
)
|
||||
}}
|
||||
}},
|
||||
|
||||
-- INCOME RETAINED --
|
||||
{{ calculate_safe_relative_increment("revenue_retained_in_gbp") }},
|
||||
|
||||
-- INCOME RETAINED POST RESOLUTIONS--
|
||||
{{ calculate_safe_relative_increment("revenue_retained_post_resolutions_in_gbp") }}
|
||||
|
||||
from plain_kpi_combination current
|
||||
left join
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue