How to filter and show by some items in the list that matches with any one item in another list

I have collected the list of items in custom state(selected-list) that was selected in multiple checkboxes.
selected-list = b, c, z

Below is the repeating group source is alpha from database and it is the list.
alpha 1 = a, b, c, d
alpha 2 = e, f, g, h
alpha 3 = x, y, z

now I need to do a filter in such a way that if any each text in the list (selected-list) matches with the any each text in the list of alpha should return the alpha contained any item in selected-list.

ex: selected-list b, c is present in the alpha 1. and selected-list z is present in the alpha 3. when I filter it should show alpha 1 and alpha 2.

Can anybody help me on this pls ?

Are a,b,c etc texts?

You could do an filter and intersect of the two and then if count > 0 it is in the list.

Yes a, b, c are texts.

I tried below logic, but it is returning only if it matches with whole list.

Screenshot 2022-05-24 at 11.59.57 PM

Can you pls guide me on how to intersect of the two and then if count > 0 ?

1 Like