# Apply a filter to a count on the y-axis of a bar vizualization

**URL:** https://discuss.elastic.co/t/apply-a-filter-to-a-count-on-the-y-axis-of-a-bar-vizualization/256133
**Category:** Kibana
**Created:** [November 20, 2020, 2:32pm UTC](https://discuss.elastic.co/t/apply-a-filter-to-a-count-on-the-y-axis-of-a-bar-vizualization/256133 "2020-11-20T14:32:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SilvrDuck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/silvrduck/32/79400_2.png) [@SilvrDuck](https://discuss.elastic.co/u/SilvrDuck)
#### Post date: [November 20, 2020, 2:32pm UTC](https://discuss.elastic.co/t/apply-a-filter-to-a-count-on-the-y-axis-of-a-bar-vizualization/256133/1 "2020-11-20T14:32:55Z")

</div>

Hi,  
I have a collection of timestamped events being part of two categories. I can filter on a field to get the events of any and display them as a histogram aggregated by timestamp. So far so good.

I can't plot both on the same plot though. I only managed to add global filters. I would simply like to see at any given time what proportion of one I get over the other.

How could I do that? I can't seem to find any filter at the metrics level.

Best

Kibana version: v 7.9.1

---

<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: [November 24, 2020, 4:18pm UTC](https://discuss.elastic.co/t/apply-a-filter-to-a-count-on-the-y-axis-of-a-bar-vizualization/256133/2 "2020-11-24T16:18:37Z")

</div>

Hey @SilvrDuck,

I am not sure if I fully understand the question, can you post a screenshot of what you are trying to achieve?  
Nevertheless, I think filters aggregation could be helpful for you. Here's the example with sample data:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/0/70b67e0c844d811059daaf01f8ff7e2b7313b3fe.png)

---

<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: [December 22, 2020, 4:18pm UTC](https://discuss.elastic.co/t/apply-a-filter-to-a-count-on-the-y-axis-of-a-bar-vizualization/256133/3 "2020-12-22T16:18:40Z")

</div>

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