# Global Filter Overrides the Hard coded Date Range

**URL:** <https://discuss.elastic.co/t/global-filter-overrides-the-hard-coded-date-range/342090>\
**Category:** Kibana\
**Created:** [August 31, 2023, 10:56pm UTC](https://discuss.elastic.co/t/global-filter-overrides-the-hard-coded-date-range/342090 "2023-08-31T22:56:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 5, 2023, 10:31am UTC](https://discuss.elastic.co/t/global-filter-overrides-the-hard-coded-date-range/342090/4 "2023-09-05T10:31:00Z")

</div>

That feels weird.

I created a very minimal test just to be sure the custom time was working:

```auto

# Clean up
DELETE discuss-342090

# Create index
PUT discuss-342090
{
  "settings": {
    "number_of_replicas": 0
  },
  "mappings": {
    "properties": {
      "expiry": {"type": "date"}
    }
  }
}

# Add some data in the past and the future
POST discuss-342090/_bulk
{ "index": {} }
{ "expiry": "2023-09-01" }
{ "index": {} }
{ "expiry": "2023-09-01" }
{ "index": {} }
{ "expiry": "2023-09-01" }
{ "index": {} }
{ "expiry": "2023-09-10" }
{ "index": {} }
{ "expiry": "2023-09-10" }
{ "index": {} }
{ "expiry": "2023-09-10" }
{ "index": {} }
{ "expiry": "2023-09-10" }

# Create a Kibana Data View
POST kbn:/api/data_views/data_view
{
  "data_view": {
    "title": "discuss-342090",
    "timeFieldName": "expiry"
  }
}

```

And created a dashboard with the same count metric with custom time ranges in the past and future, all working as expected.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0ecdb780da7cfc9ffbeb3d060d97297f62bb58bd.png)

So at this point, if you could share some example data similarly to the way I did so we can try to reproduce the issue and investigate further, maybe we can open an issue in the Github repository.

Hope it helps.

---

_[View the full topic](https://discuss.elastic.co/t/global-filter-overrides-the-hard-coded-date-range/342090)._
