# Creating a visualization that uses filter ratios to see utilization rate of a certain field

**URL:** https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308
**Category:** Kibana
**Created:** [June 16, 2020, 1:29pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308 "2020-06-16T13:29:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Rietty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rietty/32/70184_2.png) [@Rietty](https://discuss.elastic.co/u/Rietty)
#### Post date: [June 16, 2020, 1:29pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/1 "2020-06-16T13:29:09Z")

</div>

Hi! I have a very simple query that I need to make with a dashboard/visualization, but can't figure out how. I believe I need to use the visualization builder widget and filter ratios for this, but perhaps there is a better way.

Essentially I have an index/index pattern that has a certain field, like `BusinessArea`. And I want to see the ratio of this field being defined/not null over ALL records in that index. For example something like `Field:BusinessArea not NULL` or something, so I can get the `%` of records that have the field defined.

Anytime I try and do this I always end up with a `100%`, which I know is not correct.

Could anyone explain how to do this?

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [June 16, 2020, 1:38pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/2 "2020-06-16T13:38:11Z")

</div>

You can do this in TSVB in the Metric tab using the "Filter ratio" aggregation. Numerator and denominator are specified using Lucene syntax, so in your case the numerator should be `_exists_:BusinessArea` and the denominator should be `*`

---

<div class="post-metadata">

### Author: ![Rietty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rietty/32/70184_2.png) [@Rietty](https://discuss.elastic.co/u/Rietty)
#### Post date: [June 16, 2020, 2:15pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/3 "2020-06-16T14:15:30Z")

</div>

Thanks! I'll try it out and post results! Is there anyway to also return a list of all index entries where it does not exist and have them in a list?

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [June 16, 2020, 2:31pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/4 "2020-06-16T14:31:14Z")

</div>

You can do that in Discover. By saving a search as a "saved search", you can also add a table view of your documents to a dashboard.

---

<div class="post-metadata">

### Author: ![Rietty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rietty/32/70184_2.png) [@Rietty](https://discuss.elastic.co/u/Rietty)
#### Post date: [June 16, 2020, 2:54pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/5 "2020-06-16T14:54:33Z")

</div>

Hi Joe, the second thing worked with the saved search. However using the numerator and denominator as indicated does not seem to work. Not sure if it's the syntax or what, but I tried both `_exists:_` and `exists:`

---

<div class="post-metadata">

### Author: ![Rietty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rietty/32/70184_2.png) [@Rietty](https://discuss.elastic.co/u/Rietty)
#### Post date: [June 16, 2020, 2:55pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/6 "2020-06-16T14:55:00Z")

</div>

Nevermind! It works! Thanks!

---

<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: [July 14, 2020, 2:55pm UTC](https://discuss.elastic.co/t/creating-a-visualization-that-uses-filter-ratios-to-see-utilization-rate-of-a-certain-field/237308/7 "2020-07-14T14:55:03Z")

</div>

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