# Kibana - Count on the data with filter condition is on last data category

**URL:** <https://discuss.elastic.co/t/kibana-count-on-the-data-with-filter-condition-is-on-last-data-category/278642>\
**Category:** Kibana\
**Created:** [July 14, 2021, 10:44am UTC](https://discuss.elastic.co/t/kibana-count-on-the-data-with-filter-condition-is-on-last-data-category/278642 "2021-07-14T10:44:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoai\_Le](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hoai_le/32/91610_2.png) [@Hoai\_Le](https://discuss.elastic.co/u/Hoai_Le)\
**Post date:** [July 14, 2021, 10:44am UTC](https://discuss.elastic.co/t/kibana-count-on-the-data-with-filter-condition-is-on-last-data-category/278642/1 "2021-07-14T10:44:02Z")

</div>

Hi all. I am a newbie, I need your help.  
Let say i have the log like this:

```auto
14/Jul/2021:00:00:05 CONTRACT_NO1 SUCESS content1
14/Jul/2021:00:00:06 CONTRACT_NO1 SUCESS content2
14/Jul/2021:00:00:07 CONTRACT_NO2 SUCESS content3
14/Jul/2021:00:00:08 CONTRACT_NO2 SUCESS content4

```

and use LogStash with filter to parse log to the structured data: datetime, contract\_no,status,content.

In kibana, i wanna count how many processes are successful for the LAST contract (in this case: CONTRACT\_NO2) in real-time.  
If there is a new CONTRACT\_NO3 come, the dashboard will AUTOMATICALLY change to count on CONTRACT\_NO3.  
I tried many ways but didn't work!. Please help. Thanks

---

<div class="post-metadata">

**Author:** ![Hoai\_Le](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hoai_le/32/91610_2.png) [@Hoai\_Le](https://discuss.elastic.co/u/Hoai_Le)\
**Post date:** [July 14, 2021, 2:16pm UTC](https://discuss.elastic.co/t/kibana-count-on-the-data-with-filter-condition-is-on-last-data-category/278642/2 "2021-07-14T14:16:47Z")

</div>

anyone, please.

---

<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:** [August 11, 2021, 2:17pm UTC](https://discuss.elastic.co/t/kibana-count-on-the-data-with-filter-condition-is-on-last-data-category/278642/3 "2021-08-11T14:17:20Z")

</div>

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