Using Current Time


I don’t know if it’s possible but i want to create a dashboard where you can see Stats above some trends with the current value. By example the number of bottles produced at the current ime.

Everything works fine when the time range is a relative one (Last 5 minutes by example) but if i choose a absolute one and the last time range is in the past then my stat value of the number bottles produced is the last value of the latest time range chosen.
I hope i make any sense :wink:

I thought i could solve it by adding the time = now() as you can see in the picture but grafana don’t allow it. Is there a solution where grafana make use of 2 different time frames?

Thanks at advance,


You can use two different time ranges by using the query option Relative time.

For example, the panel with the configuration above will show data in the last 5 minutes, whatever my dashboard time range is set to.


Thanks for the reply.
I saw it but it only works with relative time range.
But not with the absolute where the problem is situated.

I would design this differently.
I will define a template variable which will always have current value and use this template variable in the panel query to find the difference between the current value and the value at that time.
you can also add reference lines where you can use that template variable which has current value in it.
Hope this will give the customers what they are actually looking for rather than showing data from two different times.

Hi seemaadhav,

Thanks for the reply.

I will elaborate on this method some more :slight_smile: