# How to get the Greater or Last Value in a Document for doing filter

**URL:** <https://discuss.elastic.co/t/how-to-get-the-greater-or-last-value-in-a-document-for-doing-filter/300246>\
**Category:** Kibana\
**Created:** [March 21, 2022, 7:33pm UTC](https://discuss.elastic.co/t/how-to-get-the-greater-or-last-value-in-a-document-for-doing-filter/300246 "2022-03-21T19:33:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [March 23, 2022, 7:43am UTC](https://discuss.elastic.co/t/how-to-get-the-greater-or-last-value-in-a-document-for-doing-filter/300246/2 "2022-03-23T07:43:51Z")

</div>

Unfortunately, at the moment it's not possible. Here's the detailed answer: [Extract Max value of build number from result and use it in filter value - #2 by Ajinkya\_Sabale](https://discuss.elastic.co/t/extract-max-value-of-build-number-from-result-and-use-it-in-filter-value/103864/2)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-get-the-greater-or-last-value-in-a-document-for-doing-filter/300246)._
