# Unique values in data tables

**URL:** https://discuss.elastic.co/t/unique-values-in-data-tables/253179
**Category:** Kibana
**Created:** [October 23, 2020, 9:10pm UTC](https://discuss.elastic.co/t/unique-values-in-data-tables/253179 "2020-10-23T21:10:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)
#### Post date: [October 23, 2020, 9:10pm UTC](https://discuss.elastic.co/t/unique-values-in-data-tables/253179/1 "2020-10-23T21:10:28Z")

</div>

I have a bunch of documents on business. One of their properties is customer\_id.  
The same customer\_id might now up in several documents, but I would only like to display unique customer\_id in data table.

Ideally the data table would look like this:  
Now:

```auto
Business1 customer_id1
Business1 customer_id1
Business1 customer_id1
Business1 customer_id2
Business2 customer_id7
Business2 customer_id7
Business2 customer_id5
Business2 customer_id8
Business2 customer_id8
Business2 customer_id8
Business2 customer_id8

```

Desired:

```auto
Business1 customer_id1
Business1 customer_id2
Business2 customer_id7
Business2 customer_id5
Business2 customer_id8

```

Mike

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [October 29, 2020, 7:34pm UTC](https://discuss.elastic.co/t/unique-values-in-data-tables/253179/2 "2020-10-29T19:34:11Z")

</div>

If you use a Terms aggregation to "Split rows" on the first field, and then add another Terms aggregation to "Split rows" on the second field, you should only get a single row with each combination of those 2 fields, along with a count for how many instances of those combinations there are;

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d83c9d796d21d4a1959c0811e6bbaddc827ed22.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: [November 26, 2020, 7:34pm UTC](https://discuss.elastic.co/t/unique-values-in-data-tables/253179/3 "2020-11-26T19:34:27Z")

</div>

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