# Mathematical Operation on Metric

**URL:** <https://discuss.elastic.co/t/mathematical-operation-on-metric/206726>\
**Category:** Kibana\
**Created:** [November 6, 2019, 5:04am UTC](https://discuss.elastic.co/t/mathematical-operation-on-metric/206726 "2019-11-06T05:04:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Gunjal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_gunjal/32/57232_2.png) [@Atul\_Gunjal](https://discuss.elastic.co/u/Atul_Gunjal)\
**Post date:** [November 6, 2019, 5:04am UTC](https://discuss.elastic.co/t/mathematical-operation-on-metric/206726/1 "2019-11-06T05:04:33Z")

</div>

I want to calculate distinct values of f\_agenda and later multiply by 5.  
For example:  
**f\_agenda**  
gomez  
garcia  
martinez  
pepe  
garcia

distinct values of f\_agenda = 4  
and later 4 \* 5  
Result = 20

And I want to use visualization Metric

---

<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:** [November 18, 2019, 5:45pm UTC](https://discuss.elastic.co/t/mathematical-operation-on-metric/206726/2 "2019-11-18T17:45:48Z")

</div>

I don't think you can achieve this with the Metric from the visulizations menu. But it's doable with the metric version of TSVB. Get the metric as Unique Count and then add a Math aggregation where you can do the multiplication.

---

<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 16, 2019, 5:45pm UTC](https://discuss.elastic.co/t/mathematical-operation-on-metric/206726/3 "2019-12-16T17:45:54Z")

</div>

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