Update rule for metric depends on invoicing

This commit is contained in:
Joaquin Ossa 2025-01-30 16:51:35 +01:00
parent a208541e04
commit 1e37d04f72
2 changed files with 30 additions and 2 deletions

View file

@ -62,7 +62,8 @@ where
(
(
-- Not show current + previous month if the metric depends on invoicing
-- cycle
-- cycle and it is before the 20th of the month, if it is the 20th of
-- the month or after, only exclude the current month.
(
lower(metric) like '%total revenue%'
or lower(metric) like '%resolutions%'
@ -71,7 +72,7 @@ where
or lower(metric) like '%mrr%'
or lower(metric) like '%damage host%'
)
and {{ is_date_before_previous_month("date") }}
and {{ is_date_before_20th_of_previous_month("date") }}
)
-- Keep all history for the rest of metrics
or not