Forum Discussion

Ash187's avatar
Ash187
Frequent Visitor
6 years ago

Using many to 1 relationship to display multiple records from both tables based on slicer

I have two tables, each row record has a ID, VendorName and a count.

 

ID1        COUNT1   Vendor

1            11             X

2             12            Y 

3              13           Z

4

...

1              11           E 

2              12           F

 

and  another table 

ID2  COUNT1  Vendor

1      11                 E    

2      12                 F

...

1       11                L

2        12               M
IDT = DISTINCT(UNION(SELECTCOLUMNS(Table1,"ID",Table1[ID1]),SELECTCOLUMNS(Table13,"ID",Table13[ID2]) ))

Since there were common multiple ID(s) in each table, I created a unique table of ID(s) from both tables.

Then linked each of the two tables through their ID(s) to this table with a many to 1 relaionship, with the cross filter direction from this table to  each of two tables.

 

Now I set up a slicer on the ID table. What I would like to is to get all records from either table 1 or table 13 based on the ID selected. By default, it should display all records in a table with no ID selected. How should I proceed ? 

 

Thanks

 

1 Reply