bpk
May 8, 2018, 9:28am
1
Hi All,
I have a Report Date column with the timestamp “YYYY-MM-DD HH:mm:ss”.
I have data for 2015,2016 and 2017 years of data.
Can I have a Template Filter as “YEAR”, which shouls display the year in it ?
Though I have it in time stamp format, I need only the Year to be extracted and used as filter. Idea behind this is to filter the table or graph year wise.
bpk
May 8, 2018, 9:54am
2
I have added the field “report Date” in Template section. Now I am getting the values inside the Dropdown as below:
2016-10-01T00:00:00,000Z
2016-11-01T00:00:00:000Z
2017-10-01T00:00:00,000Z
2017-11-01T00:00:00:000Z
But, What I wanted is
2016
2017
Is it something to be done with the Regex ? I have tried
doc[‘field_name’].date.year
But it didnt work. Someone please help me on this.
bpk
May 9, 2018, 7:06am
3
@torkel @mefraimsson . Sorry for Tagging, But didn’t get any help from this community.
I think that, you can’t use time range filter in a template query.
opened 09:08AM - 16 Jun 17 UTC
closed 03:44PM - 16 Jun 17 UTC
Is it possible to use time range filter (i.e. $from, $to or $timeFilter) in temp… late query?
In Grafana documentation I see "Set this only to On Time Range Change if your variable options query contains a time range filter or is dependent on dashboard time range."
But when I try to use time range filter ($from, $to or $timeFilter) in template query it sends query to CH as is, without replacing $from, $to or $timeFilter