MRR change

This commit is contained in:
Joaquin Ossa 2025-01-30 15:15:34 +01:00
parent a208541e04
commit 142b5a526f
3 changed files with 13 additions and 6 deletions

View file

@ -68,11 +68,18 @@ where
or lower(metric) like '%resolutions%'
or lower(metric) like '%invoiced%'
or lower(metric) like '%retained%'
or lower(metric) like '%mrr%'
or lower(metric) like '%damage host%'
)
and {{ is_date_before_previous_month("date") }}
)
-- Not show current month if the metric is Expected MRR, unlike other
-- revenue metrics, Expected MRR is calculated for the next month, so it is not
-- affected by the invoicing cycle.
or not
(
lower(metric) like '%mrr%'
and date_trunc('month', m.date)::date = date_trunc('month', now())::date
)
-- Keep all history for the rest of metrics
or not
(