data-dwh-dbt-project/models/intermediate
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
..
athena Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
check_in_hero back to created date 2025-01-21 10:18:46 +01:00
core Addressed comments 2025-02-19 16:37:40 +01:00
cross Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview 2025-02-25 09:41:28 +00:00
edeposit change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
hubspot change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
kpis Merged PR 4425: Reworks Billable Bookings metrics 2025-02-17 15:59:21 +00:00
screen_and_protect Updated tests on S&P fees 2025-02-23 16:14:42 +01:00
xero Merged PR 4228: First version of sales - monthly trends 2025-01-31 08:33:15 +00:00