# Using time shift in ES|QL dashboard panels

**URL:** <https://discuss.elastic.co/t/using-time-shift-in-es-ql-dashboard-panels/389751>\
**Category:** Kibana\
**Tags:** dashboard\
**Created:** [August 18, 2026, 1:25pm UTC](https://discuss.elastic.co/t/using-time-shift-in-es-ql-dashboard-panels/389751 "2026-08-18T13:25:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tallakh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tallakh/32/8860_2.png) [@tallakh](https://discuss.elastic.co/u/tallakh)\
**Post date:** [August 18, 2026, 1:25pm UTC](https://discuss.elastic.co/t/using-time-shift-in-es-ql-dashboard-panels/389751/1 "2026-08-18T13:25:07Z")

</div>

**Is time shift planned for ES|QL dashboard panels?**

I'm building Kibana dashboards using ES|QL and would like to compare the time range selected in the dashboard with the same period 52 weeks earlier.

Ideally, I'd like to do something like:

```auto
FROM my-index
| WHERE
    (date >= ?_tstart AND date <= ?_tend)
    OR
    (date >= ?_tstart - 52 weeks AND date <= ?_tend - 52 weeks)

```

However, Kibana currently sends the dashboard time range as a top-level `filter` on the ES|QL request. This means documents outside the selected dashboard time range are filtered out before the ES|QL query runs, so the query cannot access the data from 52 weeks earlier.

Lens handles this nicely with:

```auto
sum(sales, shift='52w')

```

but I haven't found an equivalent way to do this in an ES|QL dashboard panel.

It would be very useful if an ES|QL panel could opt out of the automatic dashboard time-range filter while still receiving `?_tstart` and `?_tend`. The ES|QL query could then decide how to use the selected time range itself.

Is support for this kind of **time shift / previous-period comparison in ES|QL dashboard panels** planned?

My main use case is comparing the currently selected period with the same period 52 weeks earlier, but the same capability would also be useful for WoW, MoM and other period comparisons.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 18, 2026, 2:58pm UTC](https://discuss.elastic.co/t/using-time-shift-in-es-ql-dashboard-panels/389751/2 "2026-08-18T14:58:22Z")

</div>

I think this might be in [Streamstats in ES|QL: running statistics over time windows · Issue #111 · elastic/roadmap · GitHub](https://github.com/elastic/roadmap/issues/111)  
Which is in the roadmap....

Not sure what is the progress on it though. And may be it's unrelated anyway 😉

---

<div class="post-metadata">

**Author:** ![tallakh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tallakh/32/8860_2.png) [@tallakh](https://discuss.elastic.co/u/tallakh)\
**Post date:** [August 19, 2026, 7:17am UTC](https://discuss.elastic.co/t/using-time-shift-in-es-ql-dashboard-panels/389751/3 "2026-08-19T07:17:12Z")

</div>

Thanks @dadoonet I found this issue which looks related [[dashboards] support 'time shift' for secondary metrics in ESQL panels · Issue #265830 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/265830) but it doesn't look like its actively worked on?
