# Get List of top occurance for specific condition

**URL:** <https://discuss.elastic.co/t/get-list-of-top-occurance-for-specific-condition/323864>\
**Category:** Kibana\
**Tags:** lens\
**Created:** [January 24, 2023, 6:03pm UTC](https://discuss.elastic.co/t/get-list-of-top-occurance-for-specific-condition/323864 "2023-01-24T18:03:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nada.nasser](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nada.nasser](https://discuss.elastic.co/u/nada.nasser)\
**Post date:** [January 24, 2023, 6:03pm UTC](https://discuss.elastic.co/t/get-list-of-top-occurance-for-specific-condition/323864/1 "2023-01-24T18:03:55Z")

</div>

I am having an index where data is logged with a success/fail flag for a specific item.  
I want to get a unique list of items who has fail and never a success. Usually a success is expected after fail from time perspective

Sample input

| Date | User | Status |
| --- | --- | --- |
| Jan 01 | user1 | Fail |
| Jan 02 | User1 | Success |
| Jan 01 | User2 | Fail |
| Jan 02 | User2 | Fail |

Output would be only user2

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [January 25, 2023, 9:37am UTC](https://discuss.elastic.co/t/get-list-of-top-occurance-for-specific-condition/323864/2 "2023-01-25T09:37:05Z")

</div>

Hi @nada.nasser

filtering based on aggregations results is not yet possible in Lens.  
You can track this issue for such feature progress: [[Lens] Allow client-side bucket filtering of numbers by selecting the visible number range · Issue #86190 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/86190)

---

<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:** [February 22, 2023, 9:37am UTC](https://discuss.elastic.co/t/get-list-of-top-occurance-for-specific-condition/323864/3 "2023-02-22T09:37:50Z")

</div>

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