Time changes after applying a column style

This is my output without using the column style

But after using it:


So is decrementing me 1 day of the original data, any suggestion?
SELECT DISTINCT date_add(date(created_on), interval 1 day) as Time,X.SLAEXPCLOSE,Y.SLAMETCLOSE,Z.OPENANDWIP

Perhaps could be the timezone setting on your Grafana

1 Like

Thank you, that helps!


image

One more question, if I set the filter of the time 2 days why is showing me 3 days?


where $__timeFilter(created_on)

@capjairgarcia
Every dashboard will save the variable settings once you tell it to. To see my point, let’s assume you have a dashboard called “DASH_1”, change the date to for example last year and “save current time range” of the dashboard like so.


Now, “Save”.
If you navigate to a different dashboard and come back to “DASH_1”, you will see that the dashboard’s date-range defaults to the value to last set it to.

1 Like

Thank you, @ardalanwrx.
But it is not what I am looking to. For example, I have this time range Last 7 days, and the table shows me 8 rows.

What is your query definition?

Thanks! @ardalanwrx

I am using 2 joins for the information to get the SLA of tickets that have meted and another one for the total tickets arrived on that month.

SELECT DISTINCT 
monthname(created_on) as metric,
Y.SLAMETCLOSE/X.CLOSED*100 as "SLAMET",
X.CLOSED,
now() as time_sec
from ticket T
left JOIN
(
SELECT
  month(created_on) as MONTH,
  count(id) as "CLOSED"
FROM ticket
WHERE Year(created_on) = 2020 and labID in (29,30)
GROUP by month(created_on)
) X on month(T.created_on)=X.MONTH
left JOIN (
SELECT
  month(created_on) as MONTH,
  count(id) as "SLAMETCLOSE"
FROM ticket
WHERE Year(created_on) = 2020 and status = 1 and TIMESTAMPDIFF(HOUR, updated_on, sla_expiration) >= 0 and labID in (29,30)
GROUP by month(created_on)
) Y on month(T.created_on)=Y.MONTH
where Year(created_on) = 2020
GROUP by metric
order by time_sec

@capjairgarcia Do you get a different output on a db interface like TablePlus or Postico?