# Filter month

**URL:** <https://discuss.elastic.co/t/filter-month/86307>\
**Category:** Kibana\
**Created:** [May 18, 2017, 4:34pm UTC](https://discuss.elastic.co/t/filter-month/86307 "2017-05-18T16:34:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 18, 2017, 4:34pm UTC](https://discuss.elastic.co/t/filter-month/86307/1 "2017-05-18T16:34:52Z")

</div>

I am using Kibana 5 .I am drawing a line chart with a year's data.I need to filter out any one specific month say Feb .

How to filter for specific months in Kibana 5?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [May 19, 2017, 9:16pm UTC](https://discuss.elastic.co/t/filter-month/86307/2 "2017-05-19T21:16:52Z")

</div>

If you want to filter out a specific month in a specific year, you could create a simple custom filter for the date range like this:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ff91307e448f18a57232de021ebb965b7e0ebd6c.png)

Values are in millis since epoch.

If you want to filter out any arbitrary month, you'd be best off either including the month as a property in your documents or creating a scripted field that calculates the month from the timestamp. This blog post would help you get started with the latter [https://www.elastic.co/blog/using-painless-kibana-scripted-fields](https://www.elastic.co/blog/using-painless-kibana-scripted-fields)

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 21, 2017, 2:26am UTC](https://discuss.elastic.co/t/filter-month/86307/3 "2017-05-21T02:26:35Z")

</div>

Thanks @Bargs.Custom filter worked.

---

<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 18, 2017, 2:26am UTC](https://discuss.elastic.co/t/filter-month/86307/4 "2017-06-18T02:26:36Z")

</div>

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