Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Using multiple shared columns as filters for two tables at once

I have 3 shared columns between two data tables. I need to keep the data tables separate as they are different data as well as separate API connections. 

 

For discussion, we will call the tables: Table 1 and Table 2, and the shared columns, SharedColumn1, SharedColumn2 and SharedColumn3.

 

I was able to create a table to use SharedColumn1 as a filter for Table 1 and Table 2 like so:

SharedTable1=
DISTINCT(UNION(
  DISTINCT('Table1'[SharedColumn1]),  DISTINCT('Table2'[SharedColumn1])))
 
This returns a column I renamed SharedTableColumn1

I then created relationships between SharedTable1, Table1 and Table2 with the corresponding shared column. I was able to filter my two tables using SharedTableColumn1.
 
I then tried to do the same thing with SharedColumn2 as so:
 
SharedTable2=
DISTINCT(UNION(
  DISTINCT('Table1'[SharedColumn2]),  DISTINCT('Table2'[SharedColumn2])))
 
However when I tried to create relationships between the resulting column SharedTableColumn2 from SharedTable2 and Table1/Table2, I get an error due to ambiguity between Table 1 and Table 2.
 
Anyone know how to fix this or if there is a better method?
 
Thanks

2 Replies