# How to display unique count with latest value in Kibana

**URL:** <https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124>\
**Category:** Kibana\
**Created:** [August 24, 2020, 1:27pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124 "2020-08-24T13:27:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zizou\_elk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zizou_elk/32/74405_2.png) [@zizou\_elk](https://discuss.elastic.co/u/zizou_elk)\
**Post date:** [August 24, 2020, 1:27pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124/1 "2020-08-24T13:27:35Z")

</div>

Hello All, Heeelp please

whenever logistic partner update the order status then new status is pushed into elasticseach.

Now every order is having multiple enteries with order status like "ORDER CONFIRM" , "APPOINTMENT SCHEDULED" , "OUT FOR DELIVERY" etc..

Problem arise when i need to see how many order are in which status. Total Order Count is 2, but in order status i get total count 4. because it count older values too. as you can see in attached screenshot.

I'm using TopHit to show the latest and actual status for each id ,and it works perfectly , but when i use a filter , the table show all status (old and latest).

 ![elk](https://us1.discourse-cdn.com/elastic/original/3X/4/1/41ad43661bbe0f52a8561c58e32862bec8fb76cc.png) ![elk1](https://us1.discourse-cdn.com/elastic/original/3X/1/4/14094d00675976252c40fbf4383d28022fd1346e.png)

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [August 24, 2020, 1:56pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124/2 "2020-08-24T13:56:08Z")

</div>

Hi, I'm not sure I fully understand what the problem is here. Could you provide some more insight into your dataset? How many orders do you have and how many do you expect to see? What do you mean "it count older values too"? And what filter are you using, on what field?

---

<div class="post-metadata">

**Author:** ![zizou\_elk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zizou_elk/32/74405_2.png) [@zizou\_elk](https://discuss.elastic.co/u/zizou_elk)\
**Post date:** [August 24, 2020, 2:44pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124/3 "2020-08-24T14:44:48Z")

</div>

thanks for your response,  
here is schema that explain my essue:

 ![elk2](https://us1.discourse-cdn.com/elastic/original/3X/7/4/74ef59028724a9baf19f47841af177c194e49a83.png)

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [September 7, 2020, 2:56pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124/4 "2020-09-07T14:56:42Z")

</div>

In the visualization, can you click `Inspect` \> `View Data` \> `Response`? Can you verify the data returned from ES is the one you expect to see?

---

<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:** [October 5, 2020, 2:57pm UTC](https://discuss.elastic.co/t/how-to-display-unique-count-with-latest-value-in-kibana/246124/5 "2020-10-05T14:57:17Z")

</div>

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