# Description Exposes new metrics: * Created Bookings (Excl. Cancelled) * Cancelled Created Bookings * Check Out Bookings (Excl. Cancelled) * Cancelled Check Out Bookings Re-naming of existing metrics: * Created Bookings -> Total Created Bookings * Checkout Bookings -> Total Check Out Bookings Removes exposure of previous Cancelled Bookings. In the monthly by deal model, it's hardcoded still - need to change PBI to remove safely. This will be done later on once we remove the Cancelled Bookings models. Adapts the existing tests on KPIs to accommodate for the changes by including new metrics. Also, I've set the detector to 5 (from 8) since it's been a while this has not triggered thus might be worth the effort to have more detection capabilities. # 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: #24637
648 lines
26 KiB
SQL
648 lines
26 KiB
SQL
{% set metrics = [
|
|
{
|
|
"order_by": 1,
|
|
"metric": "Created Bookings (Excl. Cancelled)",
|
|
"value": "not_cancelled_created_bookings",
|
|
"previous_year_value": "previous_year_not_cancelled_created_bookings",
|
|
"relative_increment": "relative_increment_not_cancelled_created_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 2,
|
|
"metric": "Cancelled Created Bookings",
|
|
"value": "cancelled_created_bookings",
|
|
"previous_year_value": "previous_year_cancelled_created_bookings",
|
|
"relative_increment": "relative_increment_cancelled_created_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 3,
|
|
"metric": "Total Created Bookings",
|
|
"value": "created_bookings",
|
|
"previous_year_value": "previous_year_created_bookings",
|
|
"relative_increment": "relative_increment_created_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 4,
|
|
"metric": "Check Out Bookings (Excl. Cancelled)",
|
|
"value": "not_cancelled_check_out_bookings",
|
|
"previous_year_value": "previous_year_not_cancelled_check_out_bookings",
|
|
"relative_increment": "relative_increment_not_cancelled_check_out_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 5,
|
|
"metric": "Cancelled Check Out Bookings",
|
|
"value": "cancelled_check_out_bookings",
|
|
"previous_year_value": "previous_year_cancelled_check_out_bookings",
|
|
"relative_increment": "relative_increment_cancelled_check_out_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 6,
|
|
"metric": "Total Check Out Bookings",
|
|
"value": "check_out_bookings",
|
|
"previous_year_value": "previous_year_check_out_bookings",
|
|
"relative_increment": "relative_increment_check_out_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 9,
|
|
"metric": "Est. Billable Bookings",
|
|
"value": "billable_bookings",
|
|
"previous_year_value": "previous_year_billable_bookings",
|
|
"relative_increment": "relative_increment_billable_bookings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 10,
|
|
"metric": "Guest Journey Created",
|
|
"value": "created_guest_journeys",
|
|
"previous_year_value": "previous_year_created_guest_journeys",
|
|
"relative_increment": "relative_increment_created_guest_journeys",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 11,
|
|
"metric": "Guest Journey Started",
|
|
"value": "started_guest_journeys",
|
|
"previous_year_value": "previous_year_started_guest_journeys",
|
|
"relative_increment": "relative_increment_started_guest_journeys",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 12,
|
|
"metric": "Guest Journey Completed",
|
|
"value": "completed_guest_journeys",
|
|
"previous_year_value": "previous_year_completed_guest_journeys",
|
|
"relative_increment": "relative_increment_completed_guest_journeys",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 13,
|
|
"metric": "Guest Journey with Payment",
|
|
"value": "paid_guest_journeys",
|
|
"previous_year_value": "previous_year_paid_guest_journeys",
|
|
"relative_increment": "relative_increment_paid_guest_journeys",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 20,
|
|
"metric": "New Deals",
|
|
"value": "new_deals",
|
|
"previous_year_value": "previous_year_new_deals",
|
|
"relative_increment": "relative_increment_new_deals",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 21,
|
|
"metric": "Deals Booked in Month",
|
|
"value": "deals_booked_in_month",
|
|
"previous_year_value": "previous_year_deals_booked_in_month",
|
|
"relative_increment": "relative_increment_deals_booked_in_month",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 22,
|
|
"metric": "Deals Booked in 6 Months",
|
|
"value": "deals_booked_in_6_months",
|
|
"previous_year_value": "previous_year_deals_booked_in_6_months",
|
|
"relative_increment": "relative_increment_deals_booked_in_6_months",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 23,
|
|
"metric": "Deals Booked in 12 Months",
|
|
"value": "deals_booked_in_12_months",
|
|
"previous_year_value": "previous_year_deals_booked_in_12_months",
|
|
"relative_increment": "relative_increment_deals_booked_in_12_months",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 24,
|
|
"metric": "Churning Deals",
|
|
"value": "churning_deals",
|
|
"previous_year_value": "previous_year_churning_deals",
|
|
"relative_increment": "relative_increment_churning_deals",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 30,
|
|
"metric": "New Listings",
|
|
"value": "new_listings",
|
|
"previous_year_value": "previous_year_new_listings",
|
|
"relative_increment": "relative_increment_new_listings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 31,
|
|
"metric": "First Time Booked Listings",
|
|
"value": "first_time_booked_listings",
|
|
"previous_year_value": "previous_year_first_time_booked_listings",
|
|
"relative_increment": "relative_increment_first_time_booked_listings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 32,
|
|
"metric": "Listings Booked in Month",
|
|
"value": "listings_booked_in_month",
|
|
"previous_year_value": "previous_year_listings_booked_in_month",
|
|
"relative_increment": "relative_increment_listings_booked_in_month",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 33,
|
|
"metric": "Listings Booked in 6 Months",
|
|
"value": "listings_booked_in_6_months",
|
|
"previous_year_value": "previous_year_listings_booked_in_6_months",
|
|
"relative_increment": "relative_increment_listings_booked_in_6_months",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 34,
|
|
"metric": "Listings Booked in 12 Months",
|
|
"value": "listings_booked_in_12_months",
|
|
"previous_year_value": "previous_year_listings_booked_in_12_months",
|
|
"relative_increment": "relative_increment_listings_booked_in_12_months",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 35,
|
|
"metric": "Churning Listings",
|
|
"value": "churning_listings",
|
|
"previous_year_value": "previous_year_churning_listings",
|
|
"relative_increment": "relative_increment_churning_listings",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 40,
|
|
"metric": "Host Resolutions Payment Count",
|
|
"value": "xero_host_resolution_payment_count",
|
|
"previous_year_value": "previous_year_xero_host_resolution_payment_count",
|
|
"relative_increment": "relative_increment_xero_host_resolution_payment_count",
|
|
"number_format": "integer",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 100,
|
|
"metric": "Revenue Retained Rate",
|
|
"value": "revenue_retained_ratio",
|
|
"previous_year_value": "previous_year_revenue_retained_ratio",
|
|
"relative_increment": "relative_increment_revenue_retained_ratio",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 101,
|
|
"metric": "Revenue Retained Post-Resolutions Rate",
|
|
"value": "revenue_retained_post_resolutions_ratio",
|
|
"previous_year_value": "previous_year_revenue_retained_post_resolutions_ratio",
|
|
"relative_increment": "relative_increment_revenue_retained_post_resolutions_ratio",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 102,
|
|
"metric": "Host Resolutions Payment Rate",
|
|
"value": "host_resolution_payment_per_created_booking_ratio",
|
|
"previous_year_value": "previous_year_host_resolution_payment_per_created_booking_ratio",
|
|
"relative_increment": "relative_increment_host_resolution_payment_per_created_booking_ratio",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 110,
|
|
"metric": "Created Booking Cancellation Rate",
|
|
"value": "cancelled_created_bookings_rate",
|
|
"previous_year_value": "previous_year_cancelled_created_bookings_rate",
|
|
"relative_increment": "relative_increment_cancelled_created_bookings_rate",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 111,
|
|
"metric": "Check Out Booking Cancellation Rate",
|
|
"value": "cancelled_check_out_bookings_rate",
|
|
"previous_year_value": "previous_year_cancelled_check_out_bookings_rate",
|
|
"relative_increment": "relative_increment_cancelled_check_out_bookings_rate",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 120,
|
|
"metric": "Guest Journey Start Rate",
|
|
"value": "start_rate_guest_journey",
|
|
"previous_year_value": "previous_year_start_rate_guest_journey",
|
|
"relative_increment": "relative_increment_start_rate_guest_journey",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 121,
|
|
"metric": "Guest Journey Completion Rate",
|
|
"value": "completion_rate_guest_journey",
|
|
"previous_year_value": "previous_year_completion_rate_guest_journey",
|
|
"relative_increment": "relative_increment_completion_rate_guest_journey",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 122,
|
|
"metric": "Guest Journey Incompletion Rate",
|
|
"value": "incompletion_rate_guest_journey",
|
|
"previous_year_value": "previous_year_incompletion_rate_guest_journey",
|
|
"relative_increment": "relative_increment_incompletion_rate_guest_journey",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 123,
|
|
"metric": "Guest Journey Payment Rate",
|
|
"value": "payment_rate_guest_journey",
|
|
"previous_year_value": "previous_year_payment_rate_guest_journey",
|
|
"relative_increment": "relative_increment_payment_rate_guest_journey",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 130,
|
|
"metric": "Revenue Churn Rate",
|
|
"value": "total_revenue_churn_average_contribution",
|
|
"previous_year_value": "previous_year_total_revenue_churn_average_contribution",
|
|
"relative_increment": "relative_increment_total_revenue_churn_average_contribution",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 131,
|
|
"metric": "Bookings Churn Rate",
|
|
"value": "created_bookings_churn_average_contribution",
|
|
"previous_year_value": "previous_year_created_bookings_churn_average_contribution",
|
|
"relative_increment": "relative_increment_created_bookings_churn_average_contribution",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 132,
|
|
"metric": "Listings Churn Rate",
|
|
"value": "listings_booked_in_month_churn_average_contribution",
|
|
"previous_year_value": "previous_year_listings_booked_in_month_churn_average_contribution",
|
|
"relative_increment": "relative_increment_listings_booked_in_month_churn_average_contribution",
|
|
"number_format": "percentage",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 200,
|
|
"metric": "Total Revenue",
|
|
"value": "total_revenue_in_gbp",
|
|
"previous_year_value": "previous_year_total_revenue_in_gbp",
|
|
"relative_increment": "relative_increment_total_revenue_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"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": 203,
|
|
"metric": "Expected Onboarding MRR per New Deal",
|
|
"value": "expected_mrr_per_deal",
|
|
"previous_year_value": "previous_year_expected_mrr_per_deal",
|
|
"relative_increment": "relative_increment_expected_mrr_per_deal",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 204,
|
|
"metric": "Expected Onboarding MRR",
|
|
"value": "expected_mrr",
|
|
"previous_year_value": "previous_year_expected_mrr",
|
|
"relative_increment": "relative_increment_expected_mrr",
|
|
"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",
|
|
"relative_increment": "relative_increment_total_revenue_per_created_booking",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"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",
|
|
"relative_increment": "relative_increment_total_revenue_per_created_guest_journey",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"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",
|
|
"relative_increment": "relative_increment_total_revenue_per_deals_booked_in_month",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"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",
|
|
"relative_increment": "relative_increment_total_revenue_per_listings_booked_in_month",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 220,
|
|
"metric": "Invoiced Operator Revenue",
|
|
"value": "xero_operator_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_operator_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_operator_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 225,
|
|
"metric": "Invoiced Booking Fees Revenue",
|
|
"value": "xero_booking_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_booking_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_booking_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 226,
|
|
"metric": "Invoiced Listing Fees Revenue",
|
|
"value": "xero_listing_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_listing_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_listing_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 227,
|
|
"metric": "Invoiced Verification Fees Revenue",
|
|
"value": "xero_verification_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_verification_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_verification_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 231,
|
|
"metric": "Invoiced Screening Plus Revenue",
|
|
"value": "xero_screening_plus_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_screening_plus_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_screening_plus_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 232,
|
|
"metric": "Invoiced ID Verification Revenue",
|
|
"value": "xero_id_verification_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_id_verification_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_id_verification_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 233,
|
|
"metric": "Invoiced Sex Offenders Check Revenue",
|
|
"value": "xero_sex_offenders_check_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_sex_offenders_check_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_sex_offenders_check_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 234,
|
|
"metric": "Invoiced Waiver Pro Revenue",
|
|
"value": "xero_waiver_pro_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_waiver_pro_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_waiver_pro_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 235,
|
|
"metric": "Invoiced Basic Protection Revenue",
|
|
"value": "xero_basic_protection_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_basic_protection_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_basic_protection_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 236,
|
|
"metric": "Invoiced Protection Plus Revenue",
|
|
"value": "xero_protection_plus_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_protection_plus_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_protection_plus_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 237,
|
|
"metric": "Invoiced Protection Pro Revenue",
|
|
"value": "xero_protection_pro_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_protection_pro_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_protection_pro_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 240,
|
|
"metric": "Invoiced APIs Revenue",
|
|
"value": "xero_apis_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_apis_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_apis_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 245,
|
|
"metric": "Invoiced Athena Revenue",
|
|
"value": "xero_guesty_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_guesty_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_guesty_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 246,
|
|
"metric": "Invoiced E-Deposit Revenue",
|
|
"value": "xero_e_deposit_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_xero_e_deposit_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_xero_e_deposit_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 250,
|
|
"metric": "Guest Revenue",
|
|
"value": "total_guest_payments_in_gbp",
|
|
"previous_year_value": "previous_year_total_guest_payments_in_gbp",
|
|
"relative_increment": "relative_increment_total_guest_payments_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 251,
|
|
"metric": "Guest Revenue per Guest Journey Completed",
|
|
"value": "guest_payments_per_completed_guest_journey",
|
|
"previous_year_value": "previous_year_guest_payments_per_completed_guest_journey",
|
|
"relative_increment": "relative_increment_guest_payments_per_completed_guest_journey",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 252,
|
|
"metric": "Guest Revenue per Guest Journey with Payment",
|
|
"value": "guest_payments_per_paid_guest_journey",
|
|
"previous_year_value": "previous_year_guest_payments_per_paid_guest_journey",
|
|
"relative_increment": "relative_increment_guest_payments_per_paid_guest_journey",
|
|
"number_format": "converted_metric_currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 260,
|
|
"metric": "Deposit Fees Revenue",
|
|
"value": "deposit_fees_in_gbp",
|
|
"previous_year_value": "previous_year_deposit_fees_in_gbp",
|
|
"relative_increment": "relative_increment_deposit_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 262,
|
|
"metric": "Waiver Revenue",
|
|
"value": "waiver_payments_in_gbp",
|
|
"previous_year_value": "previous_year_waiver_payments_in_gbp",
|
|
"relative_increment": "relative_increment_waiver_payments_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 263,
|
|
"metric": "Damage Host-Waiver Payments",
|
|
"value": "xero_waiver_paid_back_to_host_in_gbp",
|
|
"previous_year_value": "previous_year_xero_waiver_paid_back_to_host_in_gbp",
|
|
"relative_increment": "relative_increment_xero_waiver_paid_back_to_host_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 264,
|
|
"metric": "Waiver Retained",
|
|
"value": "waiver_net_fees_in_gbp",
|
|
"previous_year_value": "previous_year_waiver_net_fees_in_gbp",
|
|
"relative_increment": "relative_increment_waiver_net_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 265,
|
|
"metric": "Check-In Hero Revenue",
|
|
"value": "checkin_cover_fees_in_gbp",
|
|
"previous_year_value": "previous_year_checkin_cover_fees_in_gbp",
|
|
"relative_increment": "relative_increment_checkin_cover_fees_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "positive",
|
|
},
|
|
{
|
|
"order_by": 270,
|
|
"metric": "Host Resolutions Amount Paid",
|
|
"value": "xero_host_resolution_amount_paid_in_gbp",
|
|
"previous_year_value": "previous_year_xero_host_resolution_amount_paid_in_gbp",
|
|
"relative_increment": "relative_increment_xero_host_resolution_amount_paid_in_gbp",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
{
|
|
"order_by": 271,
|
|
"metric": "Host Resolutions Amount Paid per Booking Created",
|
|
"value": "host_resolution_amount_paid_per_created_booking",
|
|
"previous_year_value": "previous_year_host_resolution_amount_paid_per_created_booking",
|
|
"relative_increment": "relative_increment_host_resolution_amount_paid_per_created_booking",
|
|
"number_format": "currency_gbp",
|
|
"increment_sign_format": "negative",
|
|
},
|
|
] %}
|
|
with
|
|
int_mtd_vs_previous_year_metrics as (
|
|
select * from {{ ref("int_mtd_vs_previous_year_metrics") }}
|
|
)
|
|
{% for metric in metrics %}
|
|
select
|
|
year,
|
|
month,
|
|
day,
|
|
is_end_of_month,
|
|
is_current_month,
|
|
is_end_of_month_or_yesterday,
|
|
first_day_month,
|
|
date,
|
|
dimension,
|
|
dimension_value,
|
|
previous_year_date,
|
|
{{ metric.order_by }} as order_by,
|
|
-- quotation marks added because text format
|
|
'{{ metric.number_format }}' as number_format,
|
|
'{{ metric.metric }}' as metric,
|
|
{{ metric.value }} as value,
|
|
{{ metric.previous_year_value }} as previous_year_value,
|
|
{{ metric.relative_increment }} as relative_increment,
|
|
case
|
|
when '{{ metric.increment_sign_format }}' = 'negative'
|
|
then {{ metric.relative_increment }} * -1
|
|
else {{ metric.relative_increment }}
|
|
end as relative_increment_with_sign_format
|
|
from int_mtd_vs_previous_year_metrics
|
|
{% if not loop.last %}
|
|
union all
|
|
{% endif %}
|
|
{% endfor %}
|