# Date histogram missing last bucket when using days

**URL:** <https://discuss.elastic.co/t/date-histogram-missing-last-bucket-when-using-days/180229>\
**Category:** Elasticsearch\
**Created:** [May 8, 2019, 6:13pm UTC](https://discuss.elastic.co/t/date-histogram-missing-last-bucket-when-using-days/180229 "2019-05-08T18:13:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elpaisa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elpaisa/32/27732_2.png) [@elpaisa](https://discuss.elastic.co/u/elpaisa)\
**Post date:** [May 8, 2019, 6:13pm UTC](https://discuss.elastic.co/t/date-histogram-missing-last-bucket-when-using-days/180229/1 "2019-05-08T18:13:56Z")

</div>

I would like to recall on this [Date\_histogram buckets not as expected](https://discuss.elastic.co/t/date-histogram-buckets-not-as-expected/76864), i have te same requirement

I have the same issue, when doing the date histogram, i use different interval values lets say 30d, 7d, what happens is that response doesn't include the last 30 days as they seem to not fit totally in that bucket, how to achieve that buckets include the last 30 and backwards?

---

<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:** [June 5, 2019, 6:14pm UTC](https://discuss.elastic.co/t/date-histogram-missing-last-bucket-when-using-days/180229/2 "2019-06-05T18:14:00Z")

</div>

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