Merged PR 4118: New Dash services Invoiced Revenue
# Description
Adds new metrics on Revenue for New Dash services:
invoiced_revenue.xero_basic_protection_net_fees_in_gbp,
invoiced_revenue.xero_waiver_pro_net_fees_in_gbp,
invoiced_revenue.xero_id_verification_net_fees_in_gbp,
invoiced_revenue.xero_protection_plus_net_fees_in_gbp,
invoiced_revenue.xero_screening_plus_net_fees_in_gbp,
invoiced_revenue.xero_sex_offenders_check_net_fees_in_gbp,
invoiced_revenue.xero_protection_pro_net_fees_in_gbp
Note that it does not add Basic Screening. This is because so far this is a free service, even though the kpis models already consider such a possibility.
First data appears for December so this will be available starting 1st February
# 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.
New Dash services Invoiced Revenue
Related work items: #26680
This commit is contained in:
parent
d12a7233c9
commit
1865bafd19
4 changed files with 131 additions and 3 deletions
|
|
@ -126,9 +126,19 @@ select
|
|||
listings.listings_booked_in_12_months,
|
||||
|
||||
-- HOST (OPERATOR) REVENUE --
|
||||
-- OLD DASH --
|
||||
invoiced_revenue.xero_booking_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_listing_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_verification_net_fees_in_gbp,
|
||||
-- NEW DASH --
|
||||
invoiced_revenue.xero_basic_protection_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_waiver_pro_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_id_verification_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_protection_plus_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_screening_plus_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_sex_offenders_check_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_protection_pro_net_fees_in_gbp,
|
||||
-- GLOBAL --
|
||||
invoiced_revenue.xero_operator_net_fees_in_gbp,
|
||||
|
||||
-- APIs REVENUE --
|
||||
|
|
|
|||
|
|
@ -360,7 +360,70 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 230,
|
||||
"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",
|
||||
|
|
@ -369,7 +432,7 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 235,
|
||||
"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",
|
||||
|
|
@ -378,7 +441,7 @@
|
|||
"increment_sign_format": "positive",
|
||||
},
|
||||
{
|
||||
"order_by": 236,
|
||||
"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",
|
||||
|
|
|
|||
|
|
@ -263,9 +263,19 @@ with
|
|||
listings.listings_booked_in_12_months,
|
||||
|
||||
-- HOST (OPERATOR) REVENUE --
|
||||
-- OLD DASH --
|
||||
invoiced_revenue.xero_booking_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_listing_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_verification_net_fees_in_gbp,
|
||||
-- NEW DASH --
|
||||
invoiced_revenue.xero_basic_protection_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_waiver_pro_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_id_verification_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_protection_plus_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_screening_plus_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_sex_offenders_check_net_fees_in_gbp,
|
||||
invoiced_revenue.xero_protection_pro_net_fees_in_gbp,
|
||||
-- GLOBAL --
|
||||
invoiced_revenue.xero_operator_net_fees_in_gbp,
|
||||
|
||||
-- APIs REVENUE --
|
||||
|
|
@ -493,9 +503,19 @@ select
|
|||
{{ calculate_safe_relative_increment("listings_booked_in_12_months") }},
|
||||
|
||||
-- HOST (OPERATOR) REVENUE --
|
||||
-- OLD DASH --
|
||||
{{ calculate_safe_relative_increment("xero_booking_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_listing_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_verification_net_fees_in_gbp") }},
|
||||
-- NEW DASH --
|
||||
{{ calculate_safe_relative_increment("xero_basic_protection_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_waiver_pro_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_id_verification_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_protection_plus_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_screening_plus_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_sex_offenders_check_net_fees_in_gbp") }},
|
||||
{{ calculate_safe_relative_increment("xero_protection_pro_net_fees_in_gbp") }},
|
||||
-- GLOBAL --
|
||||
{{ calculate_safe_relative_increment("xero_operator_net_fees_in_gbp") }},
|
||||
|
||||
-- APIs REVENUE --
|
||||
|
|
|
|||
|
|
@ -90,6 +90,41 @@ select
|
|||
then xero_verification_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_verification_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_basic_protection_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_basic_protection_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_waiver_pro_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_waiver_pro_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_id_verification_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_id_verification_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_protection_plus_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_protection_plus_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_screening_plus_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_screening_plus_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_sex_offenders_check_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_sex_offenders_check_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_protection_pro_net_fees_in_gbp
|
||||
else null
|
||||
end as xero_protection_pro_net_fees_in_gbp,
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then xero_guesty_net_fees_in_gbp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue