data-dwh-dbt-project/models/intermediate/cross
Oriol Roqué Paniagua a6671ee4d0 Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview
# Description

Changes:
* Adds Revenue Churn Rate in YTD/MTD Overview. This has several implications, I finally understood how to properly compute a YTD.

The problem is that Revenue Churn Rate is a % of the Total "Churned" Revenue in a 12 m period vs. the Total Revenue in the same 12 m period. This is a bit tricky because it's not really additive, because of the Churn definition. Total Churned Revenue is the Revenue that the churned deals in a month generated on that past 12 months prior to churning.

So - in order to aggregate it properly, we need to do the sum of the Total Churned Revenue and retrieve the Total Revenue on these 12 months, and THEN compute the Churn rate.

This PR mainly retrieves the necessary input from the Churn models and then follows a similar computation as for the rest of YTD/MTD converted metrics.

I'll handle Onboarding MRR in a separated PR as this one is quite dense already.

# 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: #27609, #27805
2025-02-25 09:41:28 +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_deals_consolidation.sql ordered names to select oldest one created 2025-01-07 11:47:14 +01:00
int_edeposit_and_athena_verifications.sql Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
int_monthly_12m_window_contribution_by_deal.sql Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
int_monthly_aggregated_metrics_history_by_deal.sql Merged PR 4425: Reworks Billable Bookings metrics 2025-02-17 15:59:21 +00:00
int_monthly_aggregated_metrics_history_by_deal_by_time_window.sql Update name of fields 2025-01-09 16:31:22 +01:00
int_monthly_churn_metrics.sql Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
int_monthly_growth_score_by_deal.sql pms data for Account Managers Overview 2025-01-10 09:17:29 +01:00
int_monthly_onboarding_mrr_per_deal.sql Addressed comments 2025-01-30 16:30:03 +01:00
int_mtd_agg_onboarding_mrr_revenue.sql wip fixing deals from hubspot 2025-01-29 17:06:37 +01:00
int_mtd_aggregated_metrics.sql Merged PR 4425: Reworks Billable Bookings metrics 2025-02-17 15:59:21 +00:00
int_mtd_vs_previous_year_metrics.sql Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
int_simple_exchange_rates.sql simple model 2024-06-14 16:44:40 +02:00
int_ytd_mtd_aggregated_main_metrics_overview.sql Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
int_ytd_mtd_main_metrics_overview.sql Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
schema.yml Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00