# How can I filter from other index?

**URL:** <https://discuss.elastic.co/t/how-can-i-filter-from-other-index/266653>\
**Category:** Kibana\
**Created:** [March 9, 2021, 7:53am UTC](https://discuss.elastic.co/t/how-can-i-filter-from-other-index/266653 "2021-03-09T07:53:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![111450](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111450/32/83915_2.png) [@111450](https://discuss.elastic.co/u/111450)\
**Post date:** [March 9, 2021, 7:53am UTC](https://discuss.elastic.co/t/how-can-i-filter-from-other-index/266653/1 "2021-03-09T07:53:18Z")

</div>

Hello, I am new to kibana and have a question.

I want to filter specific IDs when I aggregate cardinality.

For example, there are [1,2,3](this is ID list) in Index A and [1,2,4,4,5,6,7,7] in Index B, I want the cardinality result in index B {value:4}. The result excludes 1 and 2 which are in Index A.

Is there any ways to do like this?

In SQL, code is like this

select ID  
from B  
where ID is not in (  
select ID  
from A)

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [March 22, 2021, 9:44am UTC](https://discuss.elastic.co/t/how-can-i-filter-from-other-index/266653/2 "2021-03-22T09:44:00Z")

</div>

Hi, unfortunately no, is not possible

---

<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:** [April 19, 2021, 9:44am UTC](https://discuss.elastic.co/t/how-can-i-filter-from-other-index/266653/3 "2021-04-19T09:44:37Z")

</div>

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