TSVB ability to use tokens in panel filters that represent global time filter values to adjust viz based on global time selection

Apologies if I'm not using the correct terminology for the kibana fields I'm referring to.

I have a need to create a day-over-day (or WoW etc) comparison visualization for a given time range.
I'm able to do it for a fixed time range (like today vs yesterday or today vs same day last week etc), but would like to have the ability to dynamically adjust my panel query to consider the global time range on the dashboard.

For instance, consider the screenshot below:

As can be seen, the panel filters hardcode for 'today' and comparison series are relative to that. If the global time range were to change to 'yesterday', my graph will show nothing as the data points fall off the range.

What I'd like to do in the panel is something like this:

'target series filter': "@timestamp>{{earliest}} and @timestamp <={{latest}}"

'comparison series (prev day) ': "@timestamp>{{earliest}}-1d and @timestamp <={{latest}}-1d"
'comparison offset': 1d

where {{earliest}} and {{latest}} are tokens that represent the values from the global time range selection.

TIA for your help!

I don't think this is currently possible, but it seems like a very reasonable request. It seems similar to these two issues on GitHub:

I seem to remember there being another issue somewhere that was exactly this same request, but I couldn't find it. I'll keep digging!

1 Like

Thanks Lukas. Is there a place for me to officially request this feature? (or should I just upvote the links you provided above?)

PS: the github issues seem to be pretty old

sounds similar to this issue as well [Lens] Time shift previous period · Issue #104259 · elastic/kibana · GitHub

...and, absent the specific solution, generally "Define tokens" (or variables) Kibana: Define variables, e.g. for offset for timelion and Visual Timeseries Builder via GUI · Issue #33927 · elastic/kibana · GitHub

these are definitely things on our backlog that we want to do

1 Like

Eagerly awaiting this feature... I'm sure this is a very common use case where one would want to compare events against a reference time range. Thanks in advance, Kibana team!

Hello team, is there a place to make this an official request that you triage? Or is there a place for us to contribute to the codebase and send a PR?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.