Commit graph

387 commits

Author SHA1 Message Date
Joaquin Ossa
ca9188b1ab Addressed comments 2025-02-14 08:35:51 +01:00
Joaquin Ossa
a00a4b4e4b Updated model 2025-02-13 17:13:05 +01:00
Joaquin Ossa
67bf836621 commit wip 2025-02-13 15:31:22 +01:00
Joaquin Ossa
b4d19ddbb5 Merged PR 4371: fixed exposures
# Description

Fixed model name

# Checklist

- [x] 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.

fixed exposures
2025-02-12 14:49:46 +00:00
Joaquin Ossa
b8c953c7eb Merged PR 4370: new active_users data
# Description

Added active and inactive users:
- Active_users: those that are actually using the services in any accommodation of their bundles
- Inactive_users: basically the difference between users with the service and active_users

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

new active_users data

Related work items: #25934
2025-02-12 14:35:56 +00:00
Joaquin Ossa
c7a8420de3 fixed schema 2025-02-12 15:35:03 +01:00
Joaquin Ossa
375c8679cd changed naming 2025-02-12 15:16:41 +01:00
Joaquin Ossa
9e744f41b0 Format schema 2025-02-12 15:03:17 +01:00
Joaquin Ossa
9af7b27e04 new active_users data 2025-02-12 15:00:31 +01:00
Joaquin Ossa
06736de6a6 Updated exposures 2025-02-12 12:50:54 +01:00
Joaquin Ossa
aa840aedd0 fixed naming 2025-02-12 09:24:53 +01:00
Joaquin Ossa
0866b2bf9d added all booking states 2025-02-12 09:09:16 +01:00
Joaquin Ossa
125325fcf2 Updated model 2025-02-11 10:44:19 +01:00
Joaquin Ossa
bc17ee7b4b New waiver fees model 2025-02-10 18:42:15 +01:00
Joaquin Ossa
b6bc19269d Fixed waiver payment logic 2025-02-10 17:48:52 +01:00
Joaquin Ossa
be6ccbafa7 Payments model for legacy report 2025-02-10 17:48:52 +01:00
Joaquin Ossa
aa04b1a84f Merged PR 4317: Services Usage in New Dash
# Description

Model that shows the usage of each New Dash service by users, listings and booking (and segmented by state)

# 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: #25934
2025-02-10 14:01:35 +00:00
Oriol Roqué Paniagua
45d8224416 Merged PR 4326: Remove cancelled Bookings. Adds index in mtd_aggregated_metrics
# Description

Main changes:
* Remove Cancelled Bookings previous logic.
* Speeds up Main KPIs by adding a couple of indexes in `mtd_aggregated_metrics`. Tested in prod, to me it looks like it's quite fast now.

# 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: #24637
2025-02-10 13:14:31 +00:00
Joaquin Ossa
e39e17fd21 finished schema 2025-02-10 08:18:11 +01:00
Joaquin Ossa
560531aa1e Addressed comments 2025-02-10 08:09:22 +01:00
Joaquin Ossa
25a89208c4 Addressed comments 2025-02-07 15:15:17 +01:00
Oriol Roqué Paniagua
167261b9ee Merged PR 4314: Remove reporting booking cancelled
# Description

Removes from reporting on monthly by deal cancelled bookings.
I'll do this at the same time to update PBI accordingly.

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

Remove reporting booking cancelled

Related work items: #24637
2025-02-07 10:59:21 +00:00
Oriol Roqué Paniagua
fe3a5c9fe9 Merged PR 4309: Cancelled Bookings KPIs rework
# Description

Exposes new metrics:
* Created Bookings (Excl. Cancelled)
* Cancelled Created Bookings
* Check Out Bookings (Excl. Cancelled)
* Cancelled Check Out Bookings

Re-naming of existing metrics:
* Created Bookings -> Total Created Bookings
* Checkout Bookings -> Total Check Out Bookings

Removes exposure of previous Cancelled Bookings. In the monthly by deal model, it's hardcoded still - need to change PBI to remove safely. This will be done later on once we remove the Cancelled Bookings models.

Adapts the existing tests on KPIs to accommodate for the changes by including new metrics. Also, I've set the detector to 5 (from 8) since it's been a while this has not triggered thus might be worth the effort to have more detection capabilities.

# 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: #24637
2025-02-06 15:12:35 +00:00
Joaquin Ossa
45dc52a657 renamed 2025-02-05 16:06:29 +01:00
Joaquin Ossa
083976b6f6 adding number of days to complete verification 2025-02-05 15:31:42 +01:00
Joaquin Ossa
fa9622721b added friendly name 2025-02-05 12:41:30 +01:00
Joaquin Ossa
ff296ec75d Model for Bookings report in Legacy 2025-02-05 11:53:28 +01:00
Oriol Roqué Paniagua
f76e49a75c Merged PR 4253: Update exposures for Invoicing and Crediting
# Description

Update exposures for Invoicing and Crediting by including the new model.

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

Related work items: #26618
2025-02-03 11:19:52 +00:00
Joaquin Ossa
3b6f6eed0a Listings report model 2025-02-03 10:37:25 +01:00
Oriol Roqué Paniagua
353972984e Merged PR 4236: Propagate contact name for reporting purposes only
# Description

Propagates contact name and id_deal + contact name combination for PBI in xero - sales monthly trends

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

Propagate contact name for reporting purposes only

Related work items: #26618
2025-01-31 09:53:54 +00:00
Joaquin Ossa
8fdabf1cb4 Fixed filter in mrr 2025-01-31 10:37:03 +01:00
Oriol Roqué Paniagua
68952223ca Merged PR 4228: First version of sales - monthly trends
# Description

New model that aggregates in a monthly basis the information from Xero sales. The aggregation is done by several categories, most of them to be included as filters in PBI. Metrics represent the amount without taxes in: 1) the current month, 2) the previous month, 3) twelve months ago, 4) current year YTD (fiscal year) and 5) previous year YTD (fiscal year).

It also propagates the model to 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.
- [ ] I've picked the right materialization for the affected models. **I was hesitating between table or view. Table should speed up tests, but I intend to create a reporting table with a similar structure so probably a bit of waste of space. Anyway, not a big deal now**

# Other

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

Related work items: #26618
2025-01-31 08:33:15 +00:00
Joaquin Ossa
d793f610c9 Merged PR 4232: Update rule for metric depends on invoicing
# Description

Update rule for when to display metrics that depend on invoicing cycle.
Now they will show previous month values from the 20th onward of the current month

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

Update rule for metric depends on invoicing

Related work items: #27180
2025-01-31 08:32:35 +00:00
Joaquin Ossa
696ac24e35 updated monthly_aggregated_metrics_history_by_deal 2025-01-30 17:18:08 +01:00
Joaquin Ossa
1e37d04f72 Update rule for metric depends on invoicing 2025-01-30 16:51:35 +01:00
Joaquin Ossa
7ada9de3a1 Added comments 2025-01-30 16:34:27 +01:00
Joaquin Ossa
40c8e20e70 Addressed comments 2025-01-30 16:30:03 +01:00
Joaquin Ossa
bb9dea8ed6 Removed changes for cutoff date 2025-01-30 16:18:29 +01:00
Joaquin Ossa
396d19b549 changed exclusion rule for metrics depending on invoicing 2025-01-30 15:43:53 +01:00
Joaquin Ossa
142b5a526f MRR change 2025-01-30 15:15:34 +01:00
Oriol Roqué Paniagua
a208541e04 Merged PR 4224: Rework accounting aggregations for Financial Reporting
# Description

This PR reworks the Financial Aggregations based on Nathan's requirements, that can be found in an Excel attached to the board ticket.

Main changes:
- Accounting seed now contains 3 financial aggregations as requested by Finance
- These 3 aggregations are propagated up to reporting. This effectively breaks a WIP report - but it's WIP, not in prod, so it's not a big deal

# 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

- [X] Check if a full-refresh is required after this PR is merged. **Need to create the seed manually**

Related work items: #26618
2025-01-30 10:28:49 +00:00
Joaquin Ossa
e63a093991 Added ratios to deal models 2025-01-24 14:47:41 +01:00
Joaquin Ossa
463de78b1e update exposures 2025-01-23 08:50:13 +01:00
Oriol Roqué Paniagua
437460065e Merged PR 4138: Adds Account Code Name in reporting
# Description

Adds account code name in reporting for sales denom mart in xero

# 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: #26618
2025-01-21 16:37:16 +00:00
Oriol Roqué Paniagua
ddc806583c Merged PR 4130: Propagate aggregations to xero sales reporting
# Description

Propagates the xero aggregations to the reporting model of xero__sales_denom_mart

# 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: #26618
2025-01-21 13:22:36 +00:00
Joaquin Ossa
f8cf824c06 cih monthly fee to reporting 2025-01-21 12:37:50 +01:00
Joaquin Ossa
e71cde0d63 PMS in new dash reporting 2025-01-21 10:12:46 +01:00
Oriol Roqué Paniagua
1865bafd19 Merged PR 4118: New Dash services Invoiced Revenue
# Description

Adds new metrics on Revenue for New Dash services:
    invoiced_revenue.xero_basic_protection_net_fees_in_gbp,
    invoiced_revenue.xero_waiver_pro_net_fees_in_gbp,
    invoiced_revenue.xero_id_verification_net_fees_in_gbp,
    invoiced_revenue.xero_protection_plus_net_fees_in_gbp,
    invoiced_revenue.xero_screening_plus_net_fees_in_gbp,
    invoiced_revenue.xero_sex_offenders_check_net_fees_in_gbp,
    invoiced_revenue.xero_protection_pro_net_fees_in_gbp

Note that it does not add Basic Screening. This is because so far this is a free service, even though the kpis models already consider such a possibility.

First data appears for December so this will be available starting 1st February

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

New Dash services Invoiced Revenue

Related work items: #26680
2025-01-20 16:23:20 +00:00
Oriol Roqué Paniagua
873402fd8e Merged PR 4105: Fixes exclusion of MRR after name change
# Description

After the name change of the metric, the exclusion in reporting for the ongoing month and previous month is not working for the new MRR metric. This PR aims to fix it.

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

Fixes exclusion of MRR after name change

Related work items: #26621
2025-01-19 09:37:07 +00:00
Joaquin Ossa
394d2e7672 excluding current and previous month for expected mrr 2025-01-17 08:29:58 +01:00