# Kibana Metric with simple query

**URL:** <https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021>\
**Category:** Kibana\
**Created:** [November 1, 2018, 12:53pm UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021 "2018-11-01T12:53:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugohendriks](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@hugohendriks](https://discuss.elastic.co/u/hugohendriks)\
**Post date:** [November 1, 2018, 12:53pm UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/1 "2018-11-01T12:53:59Z")

</div>

Hi,

Í am trying to get a simple metric visualization going by making a Metric, with a count aggregation and then selecting a filter in wich I set the query...something like:

operation : Validatie\* and httpresponse : 500

But that gives me a different number then when I input the query in discovery mode. Can anyone tell me what I am doing wrong here?

best regards,  
Hugo

---

<div class="post-metadata">

**Author:** ![Mike.Barretta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike.barretta/32/16688_2.png) [@Mike.Barretta](https://discuss.elastic.co/u/Mike.Barretta)\
**Post date:** [November 1, 2018, 1:59pm UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/2 "2018-11-01T13:59:01Z")

</div>

@hugohendriks  
Are you using the search bar or the filter bar? Or search bar for one and filter bar for the other?

---

<div class="post-metadata">

**Author:** ![hugohendriks](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@hugohendriks](https://discuss.elastic.co/u/hugohendriks)\
**Post date:** [November 1, 2018, 3:39pm UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/3 "2018-11-01T15:39:00Z")

</div>

In the explorer view, I am using the search bar at the top. In my visualization I am using 1 filter

![filter](https://us1.discourse-cdn.com/elastic/original/3X/0/5/05af40d6c20f152d04d612c4e6f5abac628092a9.png)

---

<div class="post-metadata">

**Author:** ![Mike.Barretta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike.barretta/32/16688_2.png) [@Mike.Barretta](https://discuss.elastic.co/u/Mike.Barretta)\
**Post date:** [November 1, 2018, 4:10pm UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/4 "2018-11-01T16:10:41Z")

</div>

@hugohendriks  
A better approach to achieve your goal is to use the filter bar vs the filters aggregation: also should run faster.

In the GIF below, you can see me create a metric, apply a filter, save the visualization, then load it into a dashboard. Notice that the filter was saved with the metric and shows the filtered number even on the dashboard that has no filters or searches applied.

 ![2018-11-01%2012_07_53](https://us1.discourse-cdn.com/elastic/original/3X/0/5/058197d551890a91275a787f55b6c0bf52fb751d.gif)

---

<div class="post-metadata">

**Author:** ![Hugo\_Hendriks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_hendriks/32/37231_2.png) [@Hugo\_Hendriks](https://discuss.elastic.co/u/Hugo_Hendriks)\
**Post date:** [November 2, 2018, 8:55am UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/5 "2018-11-02T08:55:21Z")

</div>

Hi Mike,

That did the trick. Thanks a bunch!

best regards,  
Hugo

---

<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:** [November 30, 2018, 8:55am UTC](https://discuss.elastic.co/t/kibana-metric-with-simple-query/155021/6 "2018-11-30T08:55:22Z")

</div>

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