Found something that looks like what I need here: https://discuss.elastic.co/t/how-to-create-time-range-conditions-on-timelion/119404 but could not make it work. Not sure how the query should look like.
I changed the timelion:es.timefield
Kibana advanced setting (Management -> Advanced Settings) with the string insert_date
and then to other timestamp field I have - DATM
, but did not manage to get anything.
I tried this query:
.es(q="month:7 AND DATM:[2016/10/01 TO 2016/12/31]", index=1961-2016*, timefield="DATM", metric='avg:T').label("Values each year from 1961 to 2016"),
.es(q="month:7 AND DATM:[1961/01/01 TO 1990/12/31]", index=1961-2016*, timefield="DATM", metric='avg:T').aggregate('avg').label("Average 1961-1990")
But does not near the first representation.