# Timelion. Different timefield ranges for each query

**URL:** https://discuss.elastic.co/t/timelion-different-timefield-ranges-for-each-query/147811
**Category:** Kibana
**Tags:** timelion
**Created:** [September 8, 2018, 11:35am UTC](https://discuss.elastic.co/t/timelion-different-timefield-ranges-for-each-query/147811 "2018-09-08T11:35:54Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tanatos\_Daniel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanatos_daniel/32/20893_2.png) [@Tanatos\_Daniel](https://discuss.elastic.co/u/Tanatos_Daniel)
#### Post date: [September 8, 2018, 3:40pm UTC](https://discuss.elastic.co/t/timelion-different-timefield-ranges-for-each-query/147811/2 "2018-09-08T15:40:33Z")

</div>

Found something that looks like what I need here: [https://discuss.elastic.co/t/how-to-create-time-range-conditions-on-timelion/119404](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.

---

_[View the full topic](https://discuss.elastic.co/t/timelion-different-timefield-ranges-for-each-query/147811)._
