# Last month time filter

**URL:** <https://discuss.elastic.co/t/last-month-time-filter/380512>\
**Category:** Kibana\
**Created:** [July 28, 2025, 9:13pm UTC](https://discuss.elastic.co/t/last-month-time-filter/380512 "2025-07-28T21:13:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [July 28, 2025, 9:13pm UTC](https://discuss.elastic.co/t/last-month-time-filter/380512/1 "2025-07-28T21:13:33Z")

</div>

Hello,

I was hoping someone could help me on how to create a time filter that would contain all the data for the preivous month.

For example, if it was the 1st of January, I would want this time filter to return all the data for December (31 days). If it was March, I would want this time filter to return all the data for February (28 or 29 days).

Thanks for your help,  
Mike

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [July 29, 2025, 3:36am UTC](https://discuss.elastic.co/t/last-month-time-filter/380512/2 "2025-07-29T03:36:15Z")

</div>

Hello @Amphagory

Welcome Back!

We can add custom date picker following below navigation :

`Stack Management > timepicker:quickRanges > you can add below part`

```auto
{
    "from": "now/M-1M",
      "to": "now/M-1M",
    "display": "Last Month(Custom)"
}

```

**Example :**

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

Post adding & reloading the browser we will see the option available in the dropdown :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/c/8cdb7340079b423d3476498d01d957ce6107ef37.png)

Thanks!!
