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) Related work items: #18580
This commit is contained in:
parent
0df5209bac
commit
e250763a1c
5 changed files with 20 additions and 0 deletions
|
|
@ -243,6 +243,7 @@ with
|
||||||
day,
|
day,
|
||||||
is_end_of_month,
|
is_end_of_month,
|
||||||
is_current_month,
|
is_current_month,
|
||||||
|
first_day_month,
|
||||||
date,
|
date,
|
||||||
previous_year_date,
|
previous_year_date,
|
||||||
{{ metric.order_by }} as order_by,
|
{{ metric.order_by }} as order_by,
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ with
|
||||||
d.day,
|
d.day,
|
||||||
d.is_end_of_month,
|
d.is_end_of_month,
|
||||||
d.is_current_month,
|
d.is_current_month,
|
||||||
|
d.first_day_month,
|
||||||
d.date,
|
d.date,
|
||||||
|
|
||||||
-- BOOKINGS --
|
-- BOOKINGS --
|
||||||
|
|
@ -146,6 +147,7 @@ select
|
||||||
current.day,
|
current.day,
|
||||||
current.is_end_of_month,
|
current.is_end_of_month,
|
||||||
current.is_current_month,
|
current.is_current_month,
|
||||||
|
current.first_day_month,
|
||||||
current.date,
|
current.date,
|
||||||
previous_year.date as previous_year_date,
|
previous_year.date as previous_year_date,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,14 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- 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
|
- name: date
|
||||||
data_type: date
|
data_type: date
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ select
|
||||||
day as day,
|
day as day,
|
||||||
is_end_of_month as is_end_of_month,
|
is_end_of_month as is_end_of_month,
|
||||||
is_current_month as is_current_month,
|
is_current_month as is_current_month,
|
||||||
|
first_day_month as first_day_month,
|
||||||
date as date,
|
date as date,
|
||||||
previous_year_date as previous_year_date,
|
previous_year_date as previous_year_date,
|
||||||
order_by as order_by,
|
order_by as order_by,
|
||||||
|
|
|
||||||
|
|
@ -345,6 +345,14 @@ models:
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- 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
|
- name: date
|
||||||
data_type: date
|
data_type: date
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue