# Set Filter with + on Last Value Aggregation

**URL:** https://discuss.elastic.co/t/set-filter-with-on-last-value-aggregation/334348
**Category:** Kibana
**Tags:** lens
**Created:** [May 25, 2023, 3:03pm UTC](https://discuss.elastic.co/t/set-filter-with-on-last-value-aggregation/334348 "2023-05-25T15:03:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jonas\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_s/32/97631_2.png) [@Jonas\_S](https://discuss.elastic.co/u/Jonas_S)
#### Post date: [May 25, 2023, 3:03pm UTC](https://discuss.elastic.co/t/set-filter-with-on-last-value-aggregation/334348/1 "2023-05-25T15:03:52Z")

</div>

Hello,

if you click the + in a lens table entry from a last value aggregation column of a text field  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/2/825a136b346515f28403e7663f8670fa9aa7514f.png)  
the resulting filter is  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/a/caee7221ae79b6569930262b1d22f9d1bfe75099.png)

I assume that happens for all aggregated columns as the expectation is that an aggregated value itself is never found in the data. But for last value there should be an exception, because these values are always there and it should be possible to filter for them in this way.

Best regards  
Jonas

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [May 25, 2023, 3:36pm UTC](https://discuss.elastic.co/t/set-filter-with-on-last-value-aggregation/334348/2 "2023-05-25T15:36:02Z")

</div>

Hi @Jonas_S

there's an enhancement request for this feature you can track here: [[Lens] Create a filter with field:value when last value metric is used on a datatable · Issue #152883 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/152883)

---

<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 22, 2023, 3:36pm UTC](https://discuss.elastic.co/t/set-filter-with-on-last-value-aggregation/334348/3 "2023-06-22T15:36:48Z")

</div>

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