Imagine that you have the following two tables. Table 1 contains a source of data, and Table 2 is effectively a catalogue of data from multiple different sources. Each of these tables are stored in a separate database, hence there is no pre-existing relationship between them.
The process of cataloguing the data in Table 1 is underway, and you want to produce a view in Power BI which indicates whether each item in Table 1 has been catalogued in Table 2, as follows:
This topic on the Power BI community forum provided a couple of options for achieving this.
In the case of the tables above, we can setup a 1:1 relationship between the ID columns in each table. The Catalogued column in Table 3 can then be created using the following DAX expression:
Catalogued = CONTAINS(Table2, Table2[ID], Table1[ID])
The following expression was also mentioned in the Power BI forum topic, but (as highlighted by other users) is a tad clunky in comparison:
Catalogued = NOT(ISBLANK(RELATED(Table2[ID])))
The following DAX expression will produce the desired column regardless of whether there is a relationship between the tables:
Catalogued = CALCULATE(COUNTROWS(Table2), FILTER(Table2, Table2[ID]=Table1[ID])) > 0