# For a given folderName and Doc\_name, we need to check what are the values of Doc\_IDs

**URL:** <https://discuss.elastic.co/t/for-a-given-foldername-and-doc-name-we-need-to-check-what-are-the-values-of-doc-ids/357761>\
**Category:** Kibana\
**Tags:** elastic-stack-monitoring\
**Created:** [April 19, 2024, 5:37am UTC](https://discuss.elastic.co/t/for-a-given-foldername-and-doc-name-we-need-to-check-what-are-the-values-of-doc-ids/357761 "2024-04-19T05:37:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![2328943\_dc](https://avatars.discourse-cdn.com/v4/letter/2/a9adbd/32.png) [@2328943\_dc](https://discuss.elastic.co/u/2328943_dc)\
**Post date:** [April 19, 2024, 5:37am UTC](https://discuss.elastic.co/t/for-a-given-foldername-and-doc-name-we-need-to-check-what-are-the-values-of-doc-ids/357761/1 "2024-04-19T05:37:25Z")

</div>

For a given folderName and Doc\_name, we need to check what are the values of Doc\_IDs.  
Eg. There are 3 Doc\_Ids (-1, 922554842, 922555415) for the foldername=6537134057912042024 and Doc\_Name= ka28en4592.zip.  
Now we need to show the data which has only one type of Doc\_Id i.e -1.  
Kindly note that, Doc ID -1 can occur multiple times. However, if there is any other Doc\_ID present along with -1, we need to ignore this record from table.

Please suggest, which type of visulaization/conditions we can use to implement this requirement.

PFA screenshot of Data. According to this requirement, we need to return only one row which is highlighted.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e051e9ae5ccc385fdd6fe8100ce47ef4ee064c2a.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [April 30, 2024, 10:50am UTC](https://discuss.elastic.co/t/for-a-given-foldername-and-doc-name-we-need-to-check-what-are-the-values-of-doc-ids/357761/2 "2024-04-30T10:50:21Z")

</div>

If I understand correctly, you want to aggregate your index by two fields and then filter results with a cardinality higher than 1. This is not possible with Lens, so you would need to create a [custom visualization](https://www.elastic.co/guide/en/kibana/current/vega.html) to get full control over the query and data rendering.
