# How to Make a Custom Date Range in a Kibana Visualization?

**URL:** https://discuss.elastic.co/t/how-to-make-a-custom-date-range-in-a-kibana-visualization/27378
**Category:** Kibana
**Created:** [August 14, 2015, 7:54am UTC](https://discuss.elastic.co/t/how-to-make-a-custom-date-range-in-a-kibana-visualization/27378 "2015-08-14T07:54:01Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GordonM](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@GordonM](https://discuss.elastic.co/u/GordonM)
#### Post date: [August 14, 2015, 10:18am UTC](https://discuss.elastic.co/t/how-to-make-a-custom-date-range-in-a-kibana-visualization/27378/2 "2015-08-14T10:18:59Z")

</div>

I was able to use date math in a raw json query submitted on the Discover page. This restricts data to the specified date range in a visualization, but the visualization still scales with a the dashboard's time interval setting (so it will zoom way out at 5 years and way in at Today, and this will still carve my query results up and distort visualization graphs). Is there a way to "lock in" the correct visualization zoom for a visualization on a dashboard?

(And anyway to do any of these easier than a raw json query?)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-make-a-custom-date-range-in-a-kibana-visualization/27378)._
