# Get unique count of most recent event

**URL:** <https://discuss.elastic.co/t/get-unique-count-of-most-recent-event/117712>\
**Category:** Kibana\
**Created:** [January 30, 2018, 10:30pm UTC](https://discuss.elastic.co/t/get-unique-count-of-most-recent-event/117712 "2018-01-30T22:30:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [January 31, 2018, 2:16am UTC](https://discuss.elastic.co/t/get-unique-count-of-most-recent-event/117712/2 "2018-01-31T02:16:27Z")

</div>

If I understand what you're looking for correctly, I just responded to a user with something similar.

> [@Scripted Fields in kibana not working](https://discuss.elastic.co/t/scripted-fields-in-kibana-not-working/117661/2):
>
> It's possible to do this with the Time Series Visual Builder I have used the following data to test against: POST discuss-117661/doc { "@timestamp": "2018-01-30T14:25:04", "Return\_Code": 1, "somme": 1 } POST discuss-117661/doc { "@timestamp": "2018-01-30T14:25:04", "Return\_Code": 1, "somme": 1 } POST discuss-117661/doc { "@timestamp": "2018-01-30T14:25:04", "Return\_Code": 1, "somme": 1 } POST discuss-117661/doc { "@timestamp": "2018-01-30T14:25:04", "Return\_Code": 0, …

With the Time Series Visual Builder, you can use the Filter Ratio to create a visualization to show the percentage or count of online/offline devices.

---

_[View the full topic](https://discuss.elastic.co/t/get-unique-count-of-most-recent-event/117712)._
