# How to Select only Last Day Filters in LENS

**URL:** <https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436>\
**Category:** Kibana\
**Tags:** lens\
**Created:** [August 23, 2023, 7:26am UTC](https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436 "2023-08-23T07:26:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arshukla](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Arshukla](https://discuss.elastic.co/u/Arshukla)\
**Post date:** [August 23, 2023, 7:26am UTC](https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436/1 "2023-08-23T07:26:29Z")

</div>

Hello Team @Marco_Liberati

When I apply the parameter "reducedTimeRange='1d'" to select values for a variable, it's currently retrieving data from the last 24 hours instead of the specific time range I want, which is from 00:00 to 23:00 hours for the last day or any chosen day.

To clarify, using the time filter (highlighted in red in below screenshot) above doesn't meet my needs because I need to display a graph using data from specific days such as N-1 Day, N-8 Day, N-15 Day, N-22 Day, and N-29 Day. This requires selecting the last 30 days in the time filter.

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

Please help with the option to select last day records

---

<div class="post-metadata">

**Author:** ![Arshukla](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Arshukla](https://discuss.elastic.co/u/Arshukla)\
**Post date:** [August 24, 2023, 6:51am UTC](https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436/2 "2023-08-24T06:51:26Z")

</div>

Hello Team, Can you please help in this one

---

<div class="post-metadata">

**Author:** ![Arshukla](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Arshukla](https://discuss.elastic.co/u/Arshukla)\
**Post date:** [September 6, 2023, 8:19am UTC](https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436/3 "2023-09-06T08:19:24Z")

</div>

Hello All, Got the solution please find the solution for the same in LENS sum("variable\_name",kql='pw.fileheader.measCollec.beginTime \> now/d-2d and pw.fileheader.measCollec.beginTime \< now/d')

---

<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:** [October 4, 2023, 8:19am UTC](https://discuss.elastic.co/t/how-to-select-only-last-day-filters-in-lens/341436/4 "2023-10-04T08:19:38Z")

</div>

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