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:
parent
93b31854f7
commit
098ab51439
12 changed files with 101 additions and 8 deletions
|
|
@ -101,6 +101,26 @@ select
|
|||
else 0
|
||||
end
|
||||
) as xero_old_dashboard_booking_net_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when
|
||||
-- Computes total bookings fees from both Old Dash and New Dash
|
||||
-- This needs to be properly handled in the aggregation logic once
|
||||
-- the alignment with Finance is done.
|
||||
ixsdm.accounting_root_aggregation in (
|
||||
'Old Dashboard Booking Fees',
|
||||
'Basic Protection',
|
||||
'Protection Plus',
|
||||
'Protection Pro',
|
||||
'Basic Screening',
|
||||
'Screening Plus',
|
||||
'Id Verification',
|
||||
'Sex Offenders Check'
|
||||
)
|
||||
then ixsdm.line_amount_wo_taxes_in_gbp
|
||||
else 0
|
||||
end
|
||||
) as xero_booking_net_fees_in_gbp,
|
||||
sum(
|
||||
case
|
||||
when ixsdm.accounting_root_aggregation = 'Listing Fees'
|
||||
|
|
@ -118,7 +138,6 @@ select
|
|||
sum(
|
||||
case
|
||||
when
|
||||
-- New Dash
|
||||
ixsdm.accounting_kpis_aggregation = 'Invoiced Operator Revenue'
|
||||
-- Prior to 1st January 2023 we didn't have the split of Booking
|
||||
-- Fees, Listing Fees and Verification Fees. Everything is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue