data-dwh-dbt-project/models/intermediate
Oriol Roqué Paniagua a3038089e8 Merged PR 5162: Fixes month shift on revenue share and rank
# Description

Fixes the Account Growth issue on the rank/share on revenue metrics.

Issue was that the share needs to be shifted one month for account computation; meaning that the impact score of April relies on the share from March (as there's no April revenue data).

The shift also affected the rank as it's based on the share.

Solution is:
* Re-bring actual revenue share and attribute it to the correct month
* Apply a coalesce giving priority to the revenue share/rank from the correct month. If no data is available (ongoing month), show share/rank of previous month. This is intended to help quantify account importance in the ongoing month - as it's actually the case in the report

Tested locally + run in prod to check the report performance. Small note, this makes revenue share not adding up anymore to 100% as accounts that go live in the same month are excluded. This is exactly the same as for Billable Items.

# 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.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] 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: #30013
2025-05-08 06:15:44 +00:00
..
athena Merged PR 5047: First API unified version of Verifications 2025-04-24 12:21:50 +00:00
check_in_hero adding id_deal to api models 2025-03-19 09:23:23 +01:00
core Merged PR 5049: Set option with basic waiver as deposit management 2025-04-24 12:20:50 +00:00
cross Merged PR 5162: Fixes month shift on revenue share and rank 2025-05-08 06:15:44 +00:00
edeposit Addressed comments 2025-03-19 12:06:05 +01:00
hubspot Merged PR 4918: Adds Integration Type from Hubspot Deals 2025-04-04 08:40:38 +00:00
kpis Commit wip 2025-04-28 09:20:59 +02:00
resolutions Calculator changes 2025-02-28 12:19:24 +01:00
screen_and_protect adding id_deal to api models 2025-03-19 09:23:23 +01:00
xero Host Resolution model for report 2025-04-29 11:43:38 +02:00