# How to find sum of unique counts when creating a table using discover?

**URL:** <https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545>\
**Category:** Kibana\
**Created:** [January 8, 2021, 12:38pm UTC](https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545 "2021-01-08T12:38:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![learnkibana](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@learnkibana](https://discuss.elastic.co/u/learnkibana)\
**Post date:** [January 8, 2021, 12:38pm UTC](https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545/1 "2021-01-08T12:38:53Z")

</div>

![Screenshot 2021-01-08 at 12.34.50](https://us1.discourse-cdn.com/elastic/original/3X/1/6/16c7dda4df27d51e2314e9654c9f8d69450ce994.png)

So I created a table using the visualisation console and I managed to get the unique values of the patent IDs. However, I am unable to find the total amount of unique patentIDs. Is there a way I can sum all the 'Unique Count of PatenID' field and get the total amount?

Help would be greatly appreciated!

---

<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:** [January 8, 2021, 7:32pm UTC](https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545/2 "2021-01-08T19:32:59Z")

</div>

Hi, welcome to the community! It is possible to use the table options to get a "total row" based on sum, but I don't recommend it here because it will _only sum the values that you see_, ignoring any values that are ranked too low.

Instead, I recommend creating a Metric visualization that uses the Cardinality/Unique count function, and putting that next to your table in the dashboard.

---

<div class="post-metadata">

**Author:** ![learnkibana](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@learnkibana](https://discuss.elastic.co/u/learnkibana)\
**Post date:** [January 11, 2021, 3:04pm UTC](https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545/3 "2021-01-11T15:04:25Z")

</div>

Thank you very much! This works for me.

---

<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 8, 2021, 3:04pm UTC](https://discuss.elastic.co/t/how-to-find-sum-of-unique-counts-when-creating-a-table-using-discover/260545/4 "2021-02-08T15:04:28Z")

</div>

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