Merged PR 2615: Beautification of KPIs dimensions

# Description

Changes:

* Separate 1) the internal naming of dimensions available within DWH vs. 2) the display of the dimensions in the reporting. Mainly it changes the "by_number_of_listings" to display "By # of Listings Booked in 12 Months". I edited the production macro since to me it's linked to when things are available for display.
* Add preceding zeros on the segmentation so it's ordered correctly. Before, the segment 21-60 was displayed before the 6-20.
* Also added some capital letters to the schema config of the reporting model :)

I attach a screenshot of how it looks in PBI in my local development branch to exemplify why this is "Beautification". Be aware that merging this also puts in production the dimensions.

![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/2615/attachments/image.png)

# 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: #19325
This commit is contained in:
Oriol Roqué Paniagua 2024-08-21 14:42:05 +00:00
parent 83d913f9fc
commit 85131985d8
5 changed files with 51 additions and 32 deletions

View file

@ -30,9 +30,9 @@ select
when accommodations_booked_in_12_months = 0
then '0'
when accommodations_booked_in_12_months between 1 and 5
then '1-5'
then '01-05'
when accommodations_booked_in_12_months between 6 and 20
then '6-20'
then '06-20'
when accommodations_booked_in_12_months between 21 and 60
then '21-60'
when accommodations_booked_in_12_months >= 61

View file

@ -1133,8 +1133,8 @@ models:
have been booked within the last 12 months. Thus, it means it only considers the lifecycle states of
03-First Time Booked, 04-Active and 07-Reactivated. The segments are the following:
- '0'
- '1-5'
- '6-20'
- '01-05'
- '06-20'
- '21-60'
- '61+'
These segments are inspired from the ones RevOps team uses, but the associated deals and listings volume will differ
@ -1167,8 +1167,8 @@ models:
- accepted_values:
values:
- '0'
- '1-5'
- '6-20'
- '01-05'
- '06-20'
- '21-60'
- '61+'