# Is it possible to use a post\_filter in Kibana visualisations?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731>\
**Category:** Kibana\
**Created:** [July 3, 2019, 1:55pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731 "2019-07-03T13:55:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_ewan](https://avatars.discourse-cdn.com/v4/letter/_/71e660/32.png) [@\_ewan](https://discuss.elastic.co/u/_ewan)\
**Post date:** [July 3, 2019, 1:55pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731/1 "2019-07-03T13:55:47Z")

</div>

Basically I want to select the latest metricbeat record for each metric and then filter the results.

A naive approach filters all the results and then chooses the latest match.

So for example an api call which errors at 13:00 and recovers at 14:00 will have the 13:00 record match the filter and be returned, where we want the 14:00 record to be returned and _then_ filtered out so that no result for that api is shown.

It seems possible to do in elastic with post\_filter, but I can't see how to achieve it in kibana

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [July 3, 2019, 3:52pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731/2 "2019-07-03T15:52:16Z")

</div>

Hey @_ewan, it's not possible to currently use the `post_filter` with the Kibana "normal" visualizations. You could use the [Vega Visualization](https://www.elastic.co/guide/en/kibana/current/vega-quick-demo.html) because in this situation you have full control over the query which is sent to Elasticsearch, but it's significantly more effort than using the "normal" Visualizations.

It'd be great if you could open up a [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md) for this to be added to the normal visualizations.

---

<div class="post-metadata">

**Author:** ![\_ewan](https://avatars.discourse-cdn.com/v4/letter/_/71e660/32.png) [@\_ewan](https://discuss.elastic.co/u/_ewan)\
**Post date:** [July 3, 2019, 7:51pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731/3 "2019-07-03T19:51:53Z")

</div>

Thanks brandon, unfortunately it doesnt look like vega has a simple table output 😕

---

<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:** [July 31, 2019, 7:51pm UTC](https://discuss.elastic.co/t/is-it-possible-to-use-a-post-filter-in-kibana-visualisations/188731/4 "2019-07-31T19:51:55Z")

</div>

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