Merged PR 4757: Creates a Total Booking Fees metric (Old dash + New dash)

# Description

Main Changes:
* Computes the total booking fees in `int_kpis__metric_daily_invoiced_revenue`
* Propagates within KPIs, including schema and tests
* Propagates within cross in both "by deal" and "by dimension/global"
* Propagates to main kpis tests

Small fix:
* In `int_mtd_vs_previous_year_metrics`, manual formatting because sqlfmt is broken on this model...

# 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: #28560
This commit is contained in:
Oriol Roqué Paniagua 2025-03-20 13:45:44 +00:00
parent 93b31854f7
commit 098ab51439
12 changed files with 101 additions and 8 deletions

View file

@ -98,12 +98,9 @@ select
then xero_old_dashboard_booking_net_fees_in_gbp
else null
end as xero_old_dashboard_booking_net_fees_in_gbp,
-- Following line is a temporary handler to not break reporting.
-- We will need this line anyway for the combination of Old and New
-- Dash.
case
when {{ is_date_before_20th_of_previous_month("date") }}
then xero_old_dashboard_booking_net_fees_in_gbp
then xero_booking_net_fees_in_gbp
else null
end as xero_booking_net_fees_in_gbp,
case