# Visualisation based of an aggregated search

**URL:** <https://discuss.elastic.co/t/visualisation-based-of-an-aggregated-search/293811>\
**Category:** Kibana\
**Created:** [January 8, 2022, 8:03pm UTC](https://discuss.elastic.co/t/visualisation-based-of-an-aggregated-search/293811 "2022-01-08T20:03:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russell\_Fulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russell_fulton/32/62888_2.png) [@Russell\_Fulton](https://discuss.elastic.co/u/Russell_Fulton)\
**Post date:** [January 8, 2022, 8:03pm UTC](https://discuss.elastic.co/t/visualisation-based-of-an-aggregated-search/293811/1 "2022-01-08T20:03:29Z")

</div>

Is there a way to base a visualisation on the results of an aggregation? For example: I have data on logins to our wireless network. It is trivial to get a pie chart that shows the proportion of success & failures however this is biased by a large number IOT devices which have . What I want to do is filter out devices based on the number of failures -- to do this I need to perform a agregation search so I have count fields that I can filter on for the the visualisation.

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [January 8, 2022, 8:32pm UTC](https://discuss.elastic.co/t/visualisation-based-of-an-aggregated-search/293811/2 "2022-01-08T20:32:08Z")

</div>

The best way to achieve this is to use tranform to create an aggregation based on device/time may be and count the number of failure and all other metrics your need, then use the index procudced by tranform to create your viz. Otherwise this is a pipeline-bucket-selector that is not supported by Kibana in the viz framework.

> **[Bucket selector aggregation | Elasticsearch Guide \[7.16\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-selector-aggregation.html)**

---

<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:** [February 5, 2022, 8:32pm UTC](https://discuss.elastic.co/t/visualisation-based-of-an-aggregated-search/293811/3 "2022-02-05T20:32:20Z")

</div>

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