# Why kibana tsvb metric display 100% as 0%

**URL:** <https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473>\
**Category:** Kibana\
**Created:** [October 28, 2019, 1:18pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473 "2019-10-28T13:18:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luis.montecatine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luis.montecatine/32/48432_2.png) [@luis.montecatine](https://discuss.elastic.co/u/luis.montecatine)\
**Post date:** [October 28, 2019, 1:18pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/1 "2019-10-28T13:18:33Z")

</div>

Hello,

I'm working with tsvb metric.

I'd like to display a ratio.  
I'm using ratio filter.

I'd like to ask about why kibana shows a 0%, when It must show 100%.  
The numerator is a count with a filter, and the numerator is the count of all of then.  
I have displayed It in two columns, the first got the numerator count, and the second one has the denominator.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/7/573982acb92974970b41ed7e63cebf6e4e633621.png)

the % should be 0,9996012 and It must shows a 100% or a 99%.

The second image shows the options. I had tried with custom data formatter and It shows the same 0%.

![image](https://sea2.discourse-cdn.com/elastic/images/transparent.png)

Hope you can help me with this.

Regards, Luis.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [October 28, 2019, 3:07pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/2 "2019-10-28T15:07:24Z")

</div>

There are two things happening here:

1. TSVB operates on an auto interval by default, and the Metric aggregations you are seeing are only working on the last bucket. In 7.4.0 and beyond there is now a switch to consider the entire time range in TSVB, instead of just that last bucket.

2. The Filter Ratio divides a metric for you, so for example if I want to see the percentage of users on 7.4.0 I could set up a query like this: `Version: "7.4.0"` and divide it by `*`. To get the opposite of that query, I would have to use `NOT Version: "7.4.0"`.

Based on your request, I don't think you should be using "Group by filters", you probably want "Group by everything". It's possible your query syntax is invalid.

---

<div class="post-metadata">

**Author:** ![luis.montecatine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luis.montecatine/32/48432_2.png) [@luis.montecatine](https://discuss.elastic.co/u/luis.montecatine)\
**Post date:** [October 28, 2019, 3:17pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/3 "2019-10-28T15:17:40Z")

</div>

Dear Wylie,

I had tried both.  
I'll show you in photos the real tsvb that I was made.  
It uses "entire range", and group by "everything".

The image I put before shows the 2 numbers that I'm trying to divide.  
It was 54864 / 54883.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a36390bdf2a07704837f35b7fe1e4901dfe3cdb4.png).

For the other hand I have the same syntax that I had used to show the numerator number and the denominator number, so I think It's correct.

I really think that kibana is rounding up the 0,9996 number to 0%, I don't really know why.

Regards, Luis.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [October 28, 2019, 3:31pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/4 "2019-10-28T15:31:09Z")

</div>

I think the issue here is that your Numerator filter is not a valid filter. Can you try using that same filter in Discover, Visualize, or Dashboards?

---

<div class="post-metadata">

**Author:** ![luis.montecatine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luis.montecatine/32/48432_2.png) [@luis.montecatine](https://discuss.elastic.co/u/luis.montecatine)\
**Post date:** [October 28, 2019, 3:34pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/5 "2019-10-28T15:34:52Z")

</div>

Sure, I'll put you this example:

I'll include a count to visualize the number that the filter are counting:

With the filter that includes all the rows that are valued:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4980262df8ad3e273a1e97fbdfcba77310298f9.png)

Includes all the null Values:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e6735fd00e13b914924eaa34adb95f1f5969ad4a.png)

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [October 28, 2019, 7:22pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/6 "2019-10-28T19:22:28Z")

</div>

The Filter Ratio uses this syntax:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)

---

<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 25, 2019, 7:22pm UTC](https://discuss.elastic.co/t/why-kibana-tsvb-metric-display-100-as-0/205473/7 "2019-11-25T19:22:30Z")

</div>

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