# How to control Time Range

**URL:** <https://discuss.elastic.co/t/how-to-control-time-range/149988>\
**Category:** Kibana\
**Created:** [September 26, 2018, 11:02am UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988 "2018-09-26T11:02:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wheelq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wheelq/32/35893_2.png) [@wheelq](https://discuss.elastic.co/u/wheelq)\
**Post date:** [September 26, 2018, 11:02am UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988/1 "2018-09-26T11:02:40Z")

</div>

How do I control the Time Range (top right corner) from within the dashboard or Visualisation?  
I'd like to have multiple graphs with different time ranges, like visualisation with count of all visits to my website since May, and separate count with visits since 2015.

---

<div class="post-metadata">

**Author:** ![seibelj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seibelj/32/35900_2.png) [@seibelj](https://discuss.elastic.co/u/seibelj)\
**Post date:** [September 26, 2018, 5:43pm UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988/2 "2018-09-26T17:43:39Z")

</div>

So the time range i.e. time picker is applied to all indexes equally. However, you can create a filter and a visualization can then use the filter. For example, assuming your visits have a date/time associated with it, you could isolate just the year/month into a separate field (2018-05-03 09:12:12.1111 would become 2018-05) and save that as it's own field. Then you would create a filter on that visualization that only includes items in your index that match your field and have '2018-05'.

Of course, if you need things to be dynamic - say always previous month - you could use the 'Date Range' aggregation and set it to the previous month.

---

<div class="post-metadata">

**Author:** ![wheelq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wheelq/32/35893_2.png) [@wheelq](https://discuss.elastic.co/u/wheelq)\
**Post date:** [October 11, 2018, 9:41am UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988/3 "2018-10-11T09:41:57Z")

</div>

Thanks but this doesn't work as expected.  
I have created a Metric Visualisation, with count as aggregation, and Bucket with Date Range aggregation set to: From: 2018, To: now.

It works as expected as long as the Time Picker in the top right corner (what's the proper name of that 'tool'? Time Range picker?) is set to Year to date. Once it is set to Last 15 minutes, it takes control over the data being displayed/count.

I have also added Date range to the filter, but the Time Picker takes control over the filter too.

Once this has been sorted out there is another outstanding issue. Even if the data will be displayed as expected, then still, the graphs get updated accordingly to the Time Picker and some of them look...well shitty because some of my graphs are set to display data for the past day only.

---

<div class="post-metadata">

**Author:** ![wheelq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wheelq/32/35893_2.png) [@wheelq](https://discuss.elastic.co/u/wheelq)\
**Post date:** [October 19, 2018, 2:16pm UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988/4 "2018-10-19T14:16:15Z")

</div>

Any ideas? 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 16, 2018, 2:16pm UTC](https://discuss.elastic.co/t/how-to-control-time-range/149988/5 "2018-11-16T14:16:17Z")

</div>

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