Create a bridge table between your two data sources that contains a single unique value from each of the two data sources. Use this single table to create a relationship to both of your data sources.
If you want to do it with a specified name, you can do countrows with a calculate.
It sounds like you might want to create measures similar to this:
[CountTable1] = Countrows(DataSource1[Name)
[CountTable2] = Countrows(DataSource2[Name)
[%InBoth] = Divide([CountTable1],[CountTable2]) >> please note that I don't know what the appropriate numerator/denominator is so please decide yourself, and if you want to only show names that occur in both data sources please try
If( [CountTable1] && [CountTable2], Divide(x,y))