data-dwh-dbt-project/models/intermediate/cross
Oriol Roqué Paniagua 3b75d9eefb Merged PR 2257: Expose guest revenue and guest journey payment metrics
This PR aims to expose the new metrics to the business KPIs report.
The new metrics exposed are, for the global and the by deal view:
- Guest Revenue
- Guest Revenue per Guest Journey Completed
- Guest Revenue per Guest Journey with Payment
- Guest Payments
- Guest Payments per Guest Journey Completed
- Guest Payments per Guest Journey with Payment
- Guest Journey with Payment
- Guest Journey Payment Rate

Changes:
- Silly change on the naming in the by deal view of `payment_rate_guest_journey` to be consistent with the global view.
- Silly change that I miss some GJ payment metric for the view by deal id.
- Added a new number format called `currency_gbp` - only for monetary metrics, available in the schema files
- Usual procedure to publish metrics: for global metrics, add them in the `int_mtd_aggregated_metrics`. I also changed the order of display.
- **Important**: to avoid displaying revenue figures until Xero invoicing is handled, I created a macro called `is_date_before_previous_month` that is called in the reporting equivalent models: `mtd_aggregated_metrics` in the where section and in the `monthly_aggregated_metrics_history_by_deal` as a case-when.

This should allow to expose all new metrics, and enable the publishing of a new update of the business kpis!

Related work items: #18107
2024-07-10 14:17:05 +00:00
..
int_daily_currency_exchange_rates.sql go back to var, made a mistake in the last commit 2024-06-17 11:32:20 +02:00
int_dates.sql start cross folder in int to stop piling models at int root 2024-06-14 16:26:18 +02:00
int_dates_by_deal.sql Merged PR 2164: Adding booking metrics by deal id for business kpis 2024-07-01 16:00:14 +00:00
int_dates_mtd.sql Merged PR 2158: Allow last day of the month to appear on 1st of month 2024-07-01 07:53:38 +00:00
int_monthly_aggregated_metrics_history_by_deal.sql Merged PR 2257: Expose guest revenue and guest journey payment metrics 2024-07-10 14:17:05 +00:00
int_monthly_guest_revenue_history_by_deal.sql Merged PR 2221: Computes (paid) guest revenue metric - fixed 2024-07-08 11:02:02 +00:00
int_mtd_aggregated_metrics.sql Merged PR 2257: Expose guest revenue and guest journey payment metrics 2024-07-10 14:17:05 +00:00
int_mtd_guest_revenue_metrics.sql Merged PR 2252: Propagate guest revenue metrics to intermediate 2024-07-10 08:52:19 +00:00
int_mtd_vs_previous_year_metrics.sql Merged PR 2252: Propagate guest revenue metrics to intermediate 2024-07-10 08:52:19 +00:00
int_simple_exchange_rates.sql simple model 2024-06-14 16:44:40 +02:00
schema.yml Merged PR 2257: Expose guest revenue and guest journey payment metrics 2024-07-10 14:17:05 +00:00