# How to do mathematic operations on metric of unique count of fieldname.keyword?

**URL:** <https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392>\
**Category:** Kibana\
**Created:** [January 24, 2020, 9:15am UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392 "2020-01-24T09:15:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sourav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sourav/32/61334_2.png) [@sourav](https://discuss.elastic.co/u/sourav)\
**Post date:** [January 24, 2020, 9:15am UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/1 "2020-01-24T09:15:42Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/9/2/92b9199d3cbc9a660449aa6de0c51603d49b5980.png)

need to do math operations on the 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:** [January 28, 2020, 4:28pm UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/2 "2020-01-28T16:28:35Z")

</div>

You can use the Math aggregation in TSVB (visual builder) for this. There is no way of doing it in the Metric visualization.

---

<div class="post-metadata">

**Author:** ![sourav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sourav/32/61334_2.png) [@sourav](https://discuss.elastic.co/u/sourav)\
**Post date:** [January 28, 2020, 8:44pm UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/3 "2020-01-28T20:44:24Z")

</div>

Hi @Marius_Dragomir,  
i tried but no luck! can you please help me with an example?  
i just want something like uniquecount of any keyword\*100 or similar math operations.

---

<div class="post-metadata">

**Author:** ![sourav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sourav/32/61334_2.png) [@sourav](https://discuss.elastic.co/u/sourav)\
**Post date:** [January 28, 2020, 8:45pm UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/4 "2020-01-28T20:45:28Z")

</div>

i could not find option to get unique count in tsvb

---

<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:** [January 29, 2020, 10:56am UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/5 "2020-01-29T10:56:16Z")

</div>

Unique count is name "Cardinality" in TSVB.

 ![Screenshot from 2020-01-29 12-54-44](https://us1.discourse-cdn.com/elastic/original/3X/1/3/136c4ad88ca8de2cadab6553a41a2cec15a0e3c9.png)

---

<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:** [February 26, 2020, 10:56am UTC](https://discuss.elastic.co/t/how-to-do-mathematic-operations-on-metric-of-unique-count-of-fieldname-keyword/216392/6 "2020-02-26T10:56:17Z")

</div>

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