# Kibana gauge count of currently filtered documents vs. total no. of documents in index

**URL:** https://discuss.elastic.co/t/kibana-gauge-count-of-currently-filtered-documents-vs-total-no-of-documents-in-index/211679
**Category:** Kibana
**Created:** [December 12, 2019, 3:15pm UTC](https://discuss.elastic.co/t/kibana-gauge-count-of-currently-filtered-documents-vs-total-no-of-documents-in-index/211679 "2019-12-12T15:15:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![silentsurfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/silentsurfer/32/59286_2.png) [@silentsurfer](https://discuss.elastic.co/u/silentsurfer)
#### Post date: [December 12, 2019, 3:15pm UTC](https://discuss.elastic.co/t/kibana-gauge-count-of-currently-filtered-documents-vs-total-no-of-documents-in-index/211679/1 "2019-12-12T15:15:36Z")

</div>

On a Kibana dashboard, I would like to add a gauge that displays, in percent, the count of currently filtered documents vs the total number of documents in the index.  
Say I have 100 documents in my index and a field "country" that can be used for filtering. 10 documents have "DE" as country. When I display the dashboard without adding any filter, the gauge should show 100%. When I filter on country='DE', it should show 10% (i.e. the numerator should be based on the current dashboard filter, but not the denominator).  
How can this be achieved?

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [December 20, 2019, 1:04pm UTC](https://discuss.elastic.co/t/kibana-gauge-count-of-currently-filtered-documents-vs-total-no-of-documents-in-index/211679/2 "2019-12-20T13:04:05Z")

</div>

From the way filters work in Kibana, this is not possible. If you have a filter on a dashboard, all the data will be filtered at ES level and will only show you results matching that. You'd have to use a different dahsboard to display this, but then you won't be able to link it to the current filter.

---

<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: [January 17, 2020, 1:04pm UTC](https://discuss.elastic.co/t/kibana-gauge-count-of-currently-filtered-documents-vs-total-no-of-documents-in-index/211679/3 "2020-01-17T13:04:09Z")

</div>

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