Commit graph

82 commits

Author SHA1 Message Date
Joaquin
e0d18acf8e Churn update 2025-03-14 10:12:54 +01:00
Joaquin Ossa
f8362c4a71 addressed comments 2025-03-07 11:32:09 +01:00
Joaquin Ossa
2d4cded48c Addressed comments and included changes in reporting 2025-03-07 11:13:03 +01:00
Joaquin Ossa
2461286c9c Updated model 2025-03-07 10:17:11 +01:00
Joaquin Ossa
f8b551a75c Updated existing model with some new fields for churning report 2025-03-06 17:12:32 +01:00
Joaquin Ossa
24d13185eb Added year and month 2025-03-06 15:02:44 +01:00
Joaquin Ossa
1245a88867 New churned deals model 2025-03-06 14:57:23 +01:00
Oriol Roqué Paniagua
5d6e860e2b Merged PR 4596: Propagates Client Type to KPIs by Deal and AM models
# Description

Propagates Client Type to KPIs by Deal and AM models. This is just a distinction between Platform and APIs.

# 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: #28181
2025-03-05 13:02:07 +00:00
Oriol Roqué Paniagua
cfc17a5d3a Merged PR 4528: Adds number format
# Description

Adds number format for display purposes

# 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.

Adds number format

Related work items: #27609
2025-02-27 13:18:03 +00:00
Oriol Roqué Paniagua
3c99c4f8bc Merged PR 4504: Onboarding MRR + Visualisation changes
# Description

Changes:
* Adds Onboarding MRR
* Refactors exclusion code for ongoing month / invoicing cycle
* Adds sign format on relative differences

# 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 14:05:54 +00:00
Oriol Roqué Paniagua
995027205c Merged PR 4502: Revert "Adds Onboarding MRR"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Adds Onboarding MRR"

Reverted commit `dab210c6`.
2025-02-25 11:44:24 +00:00
Oriol Roqué Paniagua
7c4b0e752b Merged PR 4501: Revert "Refactor display exclusion for clarity purposes"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Refactor display exclusion for clarity purposes"

Reverted commit `fdec616f`.
2025-02-25 11:43:46 +00:00
Oriol Roqué Paniagua
5eebb4f560 Merged PR 4500: Revert "Relative increments with sign"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Relative increments with sign"

Reverted commit `f5718ded`.
2025-02-25 11:43:05 +00:00
uri
f5718ded4d Relative increments with sign 2025-02-25 12:30:23 +01:00
uri
fdec616fe6 Refactor display exclusion for clarity purposes 2025-02-25 11:45:14 +01:00
uri
dab210c607 Adds Onboarding MRR 2025-02-25 11:33:37 +01:00
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
Oriol Roqué Paniagua
85c2c73da7 Merged PR 4483: Adding targets (to be revised). Allows multi-year last-date computation
# Description

Changes:
* Adds template for targets -> These need to be revised
* Adds comparison of values vs. targets
* Allows for multi-year last date computation (allowing multiple years to be selected, not just the last one)

# 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-24 10:39:45 +00:00
Oriol Roqué Paniagua
7260368bad Merged PR 4443: First version of the aggregated model for YTD/MTD Overview
# Description

First version of the model int_ytd_mtd_aggregated_main_metrics_overview

It aggregates data at the level of:
* Date
* Dimension
* Dimension Value
* Metric Name (or Id Metric)

This computes differences and relative differences in:
* current MTD vs previous month EOM
* current MTD vs previous year MTD
* current year YTD vs previous year YTD

This is applied to 13 metrics, namely:
* Total Revenue
* Revenue Retained Post-Resolutions
* Guest Revenue
* Invoiced Operator Revenue
* Invoiced APIs Revenue
* Billable Bookings
* Live Deals
* New Deals
* Churning Deals
* Damage Waiver Payout Rate
* Host Resolutions Payout Rate
* Invoiced Operator Revenue per Billable Booking
* Waiver Revenue per Billable Booking

This still does not handle:
* Comparison vs. targets (to be done later, need input)
* Missing metrics on Onboarding MRR / Revenue Churn (to be done later)
* Invoicing dependant data exclusion (to be done in reporting)

# 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. **At the moment I keep everything as views and seems ok. We'll see if this needs to be materialised as tables later on**

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #27609
2025-02-18 15:45:24 +00:00
Oriol Roqué Paniagua
073620bd3d Merged PR 4439: First version of int_ytd_mtd_main_metrics_overview
# Description

New model for the purpose of Main KPIs - Overview.

It computes:
* Current MTD value
* Previous Month EOM value
* Previous Year MTD value (12 months ago)
* Current YTD value
* Previous Year YTD value

for the metrics:
* Total Revenue
* Revenue Retained Post-Resolutions
* Guest Revenue
* Invoiced Operator Revenue
* Invoiced APIs Revenue
* Host Resolutions Amount Paid
* Damage Host Waiver Payments
* Billable Bookings
* New Deals
* Churning Deals
* Live Deals (dedicated logic handling)
* Waiver Revenue

Additionally it properly computes the following derived metrics:
* Waiver Payout Rate
* Resolutions Payout Rate
* Operator Revenue per Billable Booking
* Waiver Revenue per Billable Booking

Only for dimension = 'global', though should be easy to extend to other dimensions.

This does not handle (yet) Onboarding MRR nor Revenue Churn Rate, mostly because I need to think how this can be properly attributed in a YTD basis.
This does not compute variations (abs. diff. or rel. diff.) yet.
This does not handle the "hiding" of invoicing metrics due to the invoicing cycle yet.
This does not handle targets... yet!

# 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
2025-02-18 14:30:12 +00:00
Oriol Roqué Paniagua
be0b8c41b6 Merged PR 4411: Propagates New Dash/Old Dash/APIs split in KPIs as per Business Scope
# Description

Changes:
* Adapt business_kpis_configuration to include By Business Scope as production dimension.
* Sets in int_mtd_metrics_vs_previous_year the selection of business scope dimension for all KPIs models. This does not affect cross kpis models (churn/mrr). I might need to check later how to adapt Churn to include this dimension, but it's not considered as for this PR. Lastly, Billable Bookings excludes New Dash.
* Adapts condition in int_mtd_metrics_vs_previous_year so MTD values would appear independently of these appearing in the previous year. This is, the model was considering that to show current month MTD values, the dimension needed to exist the year prior. This does not happen with New Dash and I assume we never noticed because in any case, most of our dimensions have quite a long history.
* Adapts int_kpis__agg_dates_main_kpis to include the business scope dimension. By the way it's actually handled, it kind of assumes that a Deal can only be in New or Old Dash (this is correct), but while on New Dash, this deal won't have data for Old Dash (this might not be 100% correct). In any case, the global figure should be ok, and only on the deal + business scope dimensionality this could cause some potential problems. However, this is not being reported anyway at the moment.
* Adapts int_kpis__agg_dates_main_kpis to have a proper variable value for the dimensions, and this is further included in business_kpis_configuration as any other model.

Small changes:
* Adapts Churn metrics to read from dimension_deals rather than core__deals. This should be more accurate anyway.

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Propagates New Dash/Old Dash/APIs split in KPIs as per Business Scope

Related work items: #27356
2025-02-14 14:12:39 +00:00
Joaquin Ossa
bb9dea8ed6 Removed changes for cutoff date 2025-01-30 16:18:29 +01:00
Joaquin Ossa
142b5a526f MRR change 2025-01-30 15:15:34 +01:00
Joaquin Ossa
63b1eac81f Addressed comments 2025-01-29 17:06:37 +01:00
Joaquin Ossa
26898322e7 wip fixing deals from hubspot 2025-01-29 17:06:37 +01:00
Joaquin Ossa
88e86ea9ed Added schema 2025-01-29 17:06:37 +01:00
Joaquin Ossa
261c6d3c49 Updated logic of model 2025-01-15 12:03:25 +01:00
Joaquin Ossa
b063454409 commit wip 2025-01-14 17:37:58 +01:00
Joaquin Ossa
1db8a050ce creates onboarding mrr model 2025-01-14 17:37:58 +01:00
Joaquin Ossa
77a70d21a4 commit wip schema 2025-01-14 17:37:58 +01:00
Pablo Martin
c3c628aec4 change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
Joaquin Ossa
a0ee26e018 pms data for Account Managers Overview 2025-01-10 09:17:29 +01:00
Joaquin Ossa
0c311d02e8 Update name of fields 2025-01-09 16:31:22 +01:00
Joaquin Ossa
bd25b473fb Adding PMS info for Account Margin report 2025-01-09 15:56:58 +01:00
Oriol Roqué Paniagua
0ec1484846 Merged PR 3967: Adds an "All History" time window to Account Margin
# Description

Quick improvement to be able to report the same setup of metrics by considering all account history up to a certain date.

It adds a new computation flow for this All History window. Note that I needed to update the macro to override this case by using unbounded preceding.

I also took the opportunity to update the exposures of the new report.

# 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: #26085
2025-01-07 15:22:30 +00:00
Oriol Roqué Paniagua
f2abd16a44 Merged PR 3939: Fixes DWH models for new PBI on AM
# Description

Mostly 2 changes:
* Fix metrics with coalesces so values are displayed
* Removes ratios, no longer needed. These are computed in PBI directly, to be able to compute the total figure correctly

# 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: #25829
2025-01-03 16:17:26 +00:00
Joaquin Ossa
6516a0fdc6 Updated schema with rebase 2025-01-03 11:29:58 +01:00
Joaquin Ossa
35e7144efd Changed the logic for the model 2025-01-03 11:26:14 +01:00
Oriol Roqué Paniagua
e406bc89ad Merged PR 3926: Propagate to reporting + fix documentation
# Description

* Creates new model monthly_aggregated_metrics_history_by_deal_by_time_window
* Modifies existing intermediate entry on schema to properly fill all fields
* Creates same entry in reporting.

# 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: #25829
2025-01-03 09:30:33 +00:00
Oriol Roqué Paniagua
a61da137fa Merged PR 3924: First version of time window aggregated metrics by deal
# Description

This model aggregates at monthly by deal level different metrics for AM reporting purposes. It also includes revenue retained ratios for client profitability assessment.

There's part of the existing AM report that could be simplified, likely, by using the new macro. This will be explored in a separated PR, if it applies.

# 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. ** Checked and there might be possibilities to simplify the code. I'll check ones I finish this line of work**
- [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: #25829
2025-01-03 08:07:16 +00:00
Oriol Roqué Paniagua
06603d01e2 Merged PR 3810: Adds is_end_of_month_or_yesterday for Main KPIs
# Description

Adds `is_end_of_month_or_yesterday` for Main KPIs.
Apparently, the fact that we do not show the ongoing value of the month on some tabs of Main KPIs is the main blocker for Ben C to consistently use Main KPIs, which he actually retrieves from the SH legacy reporting. Since I'm sceptical about the data shown there, I want to remove this blocker.
It will require a small PR on PBI as well.

# 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.
- [NA] 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: #25342
2024-12-09 16:13:52 +00:00
Joaquin Ossa
d6f30a8e67 Added missing values 2024-12-03 10:37:05 +01:00
Joaquin Ossa
b03982b708 Added total fee cost of booking 2024-12-02 08:44:24 +01:00
Joaquin Ossa
edbeac253c Name change 2024-11-29 11:03:59 +01:00
Joaquin Ossa
4e6690c013 API verifications model 2024-11-29 09:59:35 +01:00
Oriol Roqué Paniagua
9ba0edb82d Merged PR 3482: Adapts date dimension skeleton for Main KPIs
# Description

New model:
* int_kpis__agg_dates_main_kpis - Serves as the skeleton of dates and dimensions for Main KPIs. It's aggregated since it follows a similar aggregation strategy. It's a single model to feed both Main KPIs visualisations. Note boolean fields are real booleans (true/false) while before these were integers (1/0). This also affects downstream models.

Main KPIs flow adaptations to new skeleton model:
* int_monthly_aggregated_metrics_history_by_deal
* int_monthly_churn_metrics - additionally, calls usual KPIs macro instead of old one
* int_mtd_vs_previous_year_metrics

Reporting changes to ensure report is not down:
* mtd_aggregated_metrics - adaptations on booleans (true-1, false-0)

Cleaning:
* get_kpi_dimensions macro is no longer used
* int_dates_by_deal model and schema entry
* int_dates_mtd_by_dimension model and schema entry
* int_dates_mtd model and schema entry

# 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: #23763
2024-11-11 15:57:37 +00:00
Oriol Roqué Paniagua
2f80642f6c Merged PR 3472: Remove unused models and schema entries for deals and accommodations
# Description

Eliminates models that have been switched with new kpis flow.
Also deletes temporary tests and schema entries.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [NA] 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.
- [NA] 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: #23762
2024-11-08 12:05:40 +00:00
Oriol Roqué Paniagua
450975301a Merged PR 3373: Setting current KPIs models for deprecation
# Description

Sets up warning for KPIs models that will be deprecated, which are:
* 13 in core
* 2 in xero
* 5 in cross

I will keep alive the cross models that handle the final aggregations for Main KPIs for the time being, as well as the newly created Churn model that has a dependency on the monthly by deal to be filled into the mtd flow. I think handling exposure logic for Main KPIs could be a separated migration.

In other words, this is already quite a bit to migrate.

# Checklist

 **I just checked that dbt compiles correctly**

- [NA] The edited models and dependants run properly with production data.
- [NA] The edited models are sufficiently documented.
- [NA] The edited models contain PK tests, and I've ran and passed them.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] 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: #23268
2024-10-30 08:54:59 +00:00
Oriol Roqué Paniagua
5c1f6f88f2 Merged PR 3279: Remove unused code: additive contribution to churn and its metrics
# Description

Simplifies the code for the models:
* int_monthly_12m_window_contribution_by_deal
* int_monthly_churn_metrics

By just removing the additive contribution approach. This also reduces the schema file information of these 2 models. I also adapted the description to clarify the state of the models.

No rush to merge this.

# 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: #22691
2024-10-24 12:47:38 +00:00
Oriol Roqué Paniagua
f426825c47 Merged PR 3286: Rename of categories for top losers/winners
# Description

Re-aligned namings with Matt and Alex. This PR just changes the top losers, losers, winners and top winners to major decline, decline, gain and major gain respectively

# 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.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Rename of categories for top losers/winners

Related work items: #23170
2024-10-22 13:06:58 +00:00