# Remove Multiple entries in visualization

**URL:** https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327
**Category:** Kibana
**Created:** [August 25, 2020, 4:54pm UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327 "2020-08-25T16:54:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jerin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerin/32/74357_2.png) [@jerin](https://discuss.elastic.co/u/jerin)
#### Post date: [August 25, 2020, 4:54pm UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/1 "2020-08-25T16:54:48Z")

</div>

```auto
Hello , 
I am trying to remove duplicate values in kibana viz 

Example : i have two keys and values 

Key: id 
value: value1

key:status
value: value1

key:id
value:value1

key:status
value:value2

if you look above 

For single key , i am having multiple values and i need to get latest value for the key ..

Example: id:test-1234
                 status: open 

          again 
       id: test-1234
       status: Closed 

I need to get the latest status value . In metrics viz , as there are multiple entries of ID , i am filtering the ID's based on unique count of it but as you can see there are multiple status for the same ID in a day so i need to get last updated status . Is this can be done through advanced json or any other option . Thanks 

```

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [August 25, 2020, 5:59pm UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/2 "2020-08-25T17:59:08Z")

</div>

Hello @jerin

This looks like a good strategy for you to try - [https://stackoverflow.com/questions/29016271/how-to-get-latest-values-for-each-group-with-an-elasticsearch-query](https://stackoverflow.com/questions/29016271/how-to-get-latest-values-for-each-group-with-an-elasticsearch-query)

---

<div class="post-metadata">

### Author: ![jerin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerin/32/74357_2.png) [@jerin](https://discuss.elastic.co/u/jerin)
#### Post date: [August 26, 2020, 6:33am UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/3 "2020-08-26T06:33:36Z")

</div>

Hello Matt  
if i use the above strategy , i only get top hits of ID..instead i should get count of total ids with unique value. Lets say i am getting the unique value but at the end, for unique value ids have three stats like open, in progress and resolved .. I have to get unique count of tickets with last updated status .

---

<div class="post-metadata">

### Author: ![jerin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerin/32/74357_2.png) [@jerin](https://discuss.elastic.co/u/jerin)
#### Post date: [August 27, 2020, 4:52am UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/4 "2020-08-27T04:52:41Z")

</div>

This is what i need  
unique count of id and top hit of status

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [September 1, 2020, 5:07pm UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/5 "2020-09-01T17:07:32Z")

</div>

I'm confused about how this doesn't meet your needs. Do you have example documents and an example query you could share?

---

<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: [September 29, 2020, 5:07pm UTC](https://discuss.elastic.co/t/remove-multiple-entries-in-visualization/246327/6 "2020-09-29T17:07:45Z")

</div>

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