Forum Discussion
How to have 2 active relationships between 2 tables
You'll likely need some kind of bridge table or combined index to relate the tables. Can you describe what are in those A and B columns?
Both ColumnA and ColumneB are string. And there can be multipe row with same value in Table1 and Table2.
So Table 1 and Table 2 shoul dhave a Many - To -Many relationships with ColumnA and ColumnB.
Althought there can be multiple row with same values in ColumnA and Column B, But the combination of ColumnA and ColumnB values is unique in Table 1 and Table 2.
- AlexisOlson7 years ago
Super User
OK, then a creating a common key/index/ID for each unique A,B pair in the query editor is a decent solution.
Here's an example of how this works:
http://radacad.com/relationship-in-power-bi-with-multiple-columns
- sacheu7 years ago
Microsoft Employee
Thanks. I read that post http://radacad.com/relationship-in-power-bi-with-multiple-columns.
But I don't understand how to apply to my problem. :o
I have visual (piechart and a stackcolumn chart) for my Table 1, and Table 2 's visual is a table.
piechart is summarized based on ColumnA of Table 1.
stackcolumn is summarized based on Column B of Table 1.
Even if i create a calucated column in each of my Table 1 and Table 2, i
how can I make powerBI display Table2 values according to what i selected in Table 1 visual?
e.g.
e.g. if i select a particular value of Column A in the pie chart,
Table2 only shows the rows with ColumnA equals to what is selected
same as if i select a value in Column B in the stacked column chart,
Table 2 only shows the rows with the selected column B.
- AlexisOlson7 years ago
Super User
If you have the index I suggested, then you can set the relationship to filter both directions, which should do exactly what you want.