Query $timeFilter and last before combined

As you can see in pic1 my graph starts at 6am because there is no data before in the requested interval. I want to fill data with the last datapoint before the interval (request like select last(…)…) so that grafana can fill with the previous. Is this possible?


have a look at FILL()

Even if in your case I don’t think that’s possible, you will probably use fill(previous) but for it to work the fill value must be present in the selected range, if the first value is null, there won’t be any value to use for filling gaps.

Also using fill(none) might be worth a try

fill(previous) isn’t working like you mentioned: i don’t have a value in the selected range and i don’t know when the previous one is before (maybe 1h or even 1 week)