Merged PR 2432: Exposing revenue metrics on the by deal view

Exposes the following metrics on the "by deal" view of business kpis:
1. Invoiced Booking Fees
1. Invoiced Listing Fees
1. Invoiced Verification Fees
1. Invoiced Guesty Fees
1. Invoiced E-Deposit Fees
1. Deposit Fees
1. Waiver Amount Paid by Guests
1. Waiver Amount Paid back to Hosts
1. Waiver Net Fees
1. Check-In Hero Amount Paid by Guests

This PR does not impact the visualisation in the dashboard, meaning, metrics won't automatically appear for users and needs an additional change in the PBI reporting.

Related work items: #18914
This commit is contained in:
Oriol Roqué Paniagua 2024-07-29 14:54:50 +00:00
parent 756d1c54d5
commit b5e5160d67

View file

@ -83,8 +83,46 @@ select
then xero_host_resolution_payment_count
else null
end as xero_host_resolution_payment_count,
case
when {{ is_date_before_previous_month("date") }}
then xero_booking_net_fees_in_gbp
else null
end as xero_booking_net_fees_in_gbp,
case
when {{ is_date_before_previous_month("date") }}
then xero_listing_net_fees_in_gbp
else null
end as xero_listing_net_fees_in_gbp,
case
when {{ is_date_before_previous_month("date") }}
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_guesty_net_fees_in_gbp
else null
end as xero_guesty_net_fees_in_gbp,
case
when {{ is_date_before_previous_month("date") }}
then xero_e_deposit_net_fees_in_gbp
else null
end as xero_e_deposit_net_fees_in_gbp,
case
when {{ is_date_before_previous_month("date") }}
then xero_waiver_paid_back_to_host_in_gbp
else null
end as xero_waiver_paid_back_to_host_in_gbp,
case
when {{ is_date_before_previous_month("date") }}
then waiver_net_fees_in_gbp
else null
end as waiver_net_fees_in_gbp,
total_guest_payments_in_gbp as total_guest_payments_in_gbp,
guest_payments_per_completed_guest_journey
as guest_payments_per_completed_guest_journey,
guest_payments_per_paid_guest_journey as guest_payments_per_paid_guest_journey
guest_payments_per_paid_guest_journey as guest_payments_per_paid_guest_journey,
deposit_fees_in_gbp as deposit_fees_in_gbp,
waiver_payments_in_gbp as waiver_payments_in_gbp,
checkin_cover_fees_in_gbp as checkin_cover_fees_in_gbp
from int_monthly_aggregated_metrics_history_by_deal