# Perform aggregation as part of a Kibana FIlter using DSL

**URL:** <https://discuss.elastic.co/t/perform-aggregation-as-part-of-a-kibana-filter-using-dsl/371468>\
**Category:** Kibana\
**Created:** [December 4, 2024, 2:47pm UTC](https://discuss.elastic.co/t/perform-aggregation-as-part-of-a-kibana-filter-using-dsl/371468 "2024-12-04T14:47:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjornbear](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@bjornbear](https://discuss.elastic.co/u/bjornbear)\
**Post date:** [December 4, 2024, 2:47pm UTC](https://discuss.elastic.co/t/perform-aggregation-as-part-of-a-kibana-filter-using-dsl/371468/1 "2024-12-04T14:47:51Z")

</div>

Is it possible to perform filtering based on aggregation? I have a large number of components as part of a service and am only interested to show metric tiles for those that exceed certain thresholds instead of everything.

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [January 9, 2025, 11:01am UTC](https://discuss.elastic.co/t/perform-aggregation-as-part-of-a-kibana-filter-using-dsl/371468/2 "2025-01-09T11:01:50Z")

</div>

Hi bjornbear,

I've already had the same problem as you.

The solution I've found is to use a Transform to aggregate the data, and then use this aggregated data directly in a visualization.

This way, you can filter out metrics that exceed your threshold.

You can find Transform documentation [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html)
