Filter based on field in a referenced CMS

Wix Studio

I would like to filter a dataset (both within the CMS and the dataset settings) by the tag of a referenced CMS.

CMS 1
Field 1 (Primary): Name
Field 2 (Tag): A,B,C

CMS 2:
Field 1 (Primary): Name
Field 2: Rich text
Field 3: Reference CMS 1

I would like to filter CMS 2 by the tag field of CMS 1.
Eg. Filter the data to only show the rows that have A or B.

How would I achieve this?

If you search teh forum there are some other posts similar to what you are trying to achieve. Here is one, for example, that may give you an idea of how to get started