# Math Aggregation not working on TSVB with two parameters

**URL:** <https://discuss.elastic.co/t/math-aggregation-not-working-on-tsvb-with-two-parameters/210219>\
**Category:** Kibana\
**Created:** [December 2, 2019, 4:47pm UTC](https://discuss.elastic.co/t/math-aggregation-not-working-on-tsvb-with-two-parameters/210219 "2019-12-02T16:47:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoSdeMenezes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brunosdemenezes/32/46413_2.png) [@BrunoSdeMenezes](https://discuss.elastic.co/u/BrunoSdeMenezes)\
**Post date:** [December 2, 2019, 4:47pm UTC](https://discuss.elastic.co/t/math-aggregation-not-working-on-tsvb-with-two-parameters/210219/1 "2019-12-02T16:47:08Z")

</div>

Hello all,

I'm trying to use TSVB to calculate a ratio between two fields.

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

If I use only one field works fine, but if I try to divide the first variable by the second variable, this is what I get as return:

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

If I use one field and a number, works fine too.

Could be a bug?

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:** [December 30, 2019, 4:47pm UTC](https://discuss.elastic.co/t/math-aggregation-not-working-on-tsvb-with-two-parameters/210219/2 "2019-12-30T16:47:10Z")

</div>

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