Merged PR 2317: Exposing first_day_month for business kpis

This PR exposes the field first_day_month in the business KPIs, for the Global view. It's just to be able to properly display graphs, since it's quite confusing doing it so by last_day_month (see screenshot)![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/2317/attachments/image.png)

Related work items: #18580
This commit is contained in:
Oriol Roqué Paniagua 2024-07-16 09:14:38 +00:00
parent 0df5209bac
commit e250763a1c
5 changed files with 20 additions and 0 deletions

View file

@ -243,6 +243,7 @@ with
day,
is_end_of_month,
is_current_month,
first_day_month,
date,
previous_year_date,
{{ metric.order_by }} as order_by,

View file

@ -32,6 +32,7 @@ with
d.day,
d.is_end_of_month,
d.is_current_month,
d.first_day_month,
d.date,
-- BOOKINGS --
@ -146,6 +147,7 @@ select
current.day,
current.is_end_of_month,
current.is_current_month,
current.first_day_month,
current.date,
previous_year.date as previous_year_date,

View file

@ -235,6 +235,14 @@ models:
tests:
- not_null
- name: first_day_month
data_type: date
description: |
first day of the month correspoding to the date field.
It comes from int_dates_mtd logic.
tests:
- not_null
- name: date
data_type: date
description: |