Wrong current value on graph or table but correct in query inspectorSee original GitHub issue
Hello, My case is really specific but hope that someone could help me.
So in short, i have materialized view with summary information on amount of mailed users of my service. Example:
As i need optional aggregation (by day, week, month, year) - i’m generating timeseries this way:
(intDiv(toUInt32(toStartOfDay(send_time)), 1200) * 1200) * 1000 AS period_day, (intDiv(toUInt32(toStartOfDay(toStartOfWeek(send_time))), 1200) * 1200) * 1000 AS period_week, (intDiv(toUInt32(toStartOfDay(toStartOfMonth(send_time))), 1200) * 1200) * 1000 AS period_month, (intDiv(toUInt32(toStartOfDay(toStartOfYear(send_time))), 1200) * 1200) * 1000 AS period_year
Here is example of query:
SELECT multiIf('$period_of_aggregation' = 'week', period_week, '$period_of_aggregation' = 'month', period_month, '$period_of_aggregation' = 'year', period_year, period_day) as t, sum(sent) as sent FROM dc.mails_aggregated WHERE $timeFilter AND status = 'sent' AND dispatch_type in ($dispatch_type) AND domain in ($domains) GROUP BY t ORDER BY t
Issue: point of graph (or line in table) for current day differs value, returned by query inspector if picked timerange is more than 7days, if it’s 7days or less - value is correct.
If i pick time range 7 days - value for current day becomes correct (105.24 K)
Same behavior is for graph representation.
I tried this on different grafana and CH-plugin versions, including latest. I’m ablre to reproduce this everywhere.
I will be grateful for your thoughts and advice.
- Created 3 years ago