Merged PR 4471: Visualisation changes
# Description Adapts YTD/MTD for visualisation purposes # 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. Visualisation changes Related work items: #27609
This commit is contained in:
parent
5942e4b81c
commit
8cf7393173
3 changed files with 27 additions and 0 deletions
|
|
@ -129,6 +129,26 @@
|
||||||
"previous_YTD": "previous_ytd_waiver_revenue_per_billable_booking",
|
"previous_YTD": "previous_ytd_waiver_revenue_per_billable_booking",
|
||||||
"requires_invoicing_data": false,
|
"requires_invoicing_data": false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id_metric": 14,
|
||||||
|
"name": "Damage Host-Waiver Payments",
|
||||||
|
"current_month_MTD": "-1*current_month_mtd_xero_waiver_paid_back_to_host_in_gbp",
|
||||||
|
"previous_month_EOM": "-1*previous_month_eom_xero_waiver_paid_back_to_host_in_gbp",
|
||||||
|
"previous_year_MTD": "-1*previous_year_mtd_xero_waiver_paid_back_to_host_in_gbp",
|
||||||
|
"current_YTD": "-1*current_ytd_xero_waiver_paid_back_to_host_in_gbp",
|
||||||
|
"previous_YTD": "-1*previous_ytd_xero_waiver_paid_back_to_host_in_gbp",
|
||||||
|
"requires_invoicing_data": true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id_metric": 15,
|
||||||
|
"name": "Host Resolutions Amount Paid",
|
||||||
|
"current_month_MTD": "-1*current_month_mtd_xero_host_resolution_amount_paid_in_gbp",
|
||||||
|
"previous_month_EOM": "-1*previous_month_eom_xero_host_resolution_amount_paid_in_gbp",
|
||||||
|
"previous_year_MTD": "-1*previous_year_mtd_xero_host_resolution_amount_paid_in_gbp",
|
||||||
|
"current_YTD": "-1*current_ytd_xero_host_resolution_amount_paid_in_gbp",
|
||||||
|
"previous_YTD": "-1*previous_ytd_xero_host_resolution_amount_paid_in_gbp",
|
||||||
|
"requires_invoicing_data": true,
|
||||||
|
},
|
||||||
] %}
|
] %}
|
||||||
with
|
with
|
||||||
int_ytd_mtd_main_metrics_overview as (
|
int_ytd_mtd_main_metrics_overview as (
|
||||||
|
|
|
||||||
|
|
@ -1968,6 +1968,12 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
|
- name: first_day_month
|
||||||
|
data_type: date
|
||||||
|
description: The first day of the month associated with the data.
|
||||||
|
data_tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: calendar_year
|
- name: calendar_year
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: The calendar year associated with the data.
|
description: The calendar year associated with the data.
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ select
|
||||||
m.calendar_year as calendar_year,
|
m.calendar_year as calendar_year,
|
||||||
m.financial_year as financial_year,
|
m.financial_year as financial_year,
|
||||||
m.date as date,
|
m.date as date,
|
||||||
|
date_trunc('month', m.date)::date as first_day_month,
|
||||||
case when m.date = ld.latest_available_date then 1 else 0 end as is_latest_date,
|
case when m.date = ld.latest_available_date then 1 else 0 end as is_latest_date,
|
||||||
m.previous_year_date as previous_year_date,
|
m.previous_year_date as previous_year_date,
|
||||||
m.dimension as dimension,
|
m.dimension as dimension,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue