Modeling Bridge Tables
Recent posts about bridge tables generated a lot of interest. Today, I will look at the many-to-many relationships in these solutions. the bridge table is also known as an intersect or intersection table. one table that contains just the teacher/instrument relationship and then. The last method is the Bridge Table method, which you may find in data warehouse literature. It is basically a many-to-many relationship.
To model the associated dimension tables in one dimension, create a second logical table source that maps to the bridge table and the other dimension table, and then add columns from the other dimension table.
How to show the data in a many to many with bridge table
Providing two separate logical table sources makes queries more efficient, because it ensures that queries against a single dimension table do not involve the bridge table. Drag objects from the Physical layer to the Business Model and Mapping layer, except the bridge table and the associated dimension table that is not joined to the fact table.
For the example described in the previous sections, you would drag all objects except for the Assignment and Employee tables. In the Business Model and Mapping layer, right-click the dimension table that is joined to the fact table, Jobs in this example, and select New Object, then select Logical Table Source.
In the Logical Table Source dialog, provide a name for the new bridge table source. It is a good practice to use the bridge table name as the name of the source, for example, Assignment.
Click the Add button in the upper right corner of the Logical Table Source dialog. Then, select the bridge table from the Name list Assignment in our example and then click Select. Notice that there is a many-to-many relationship between the bridge table and the fact table.
This can be understood as follows: A given fact may reference multiple rows in the bridge.
Chris Adamson’s Blog: Bridge Tables and Many-to-many Relationships
This happens when two salespeople collaborate on an order. A given row in the bridge may reference multiple facts. This happens when the same group collaborates on more than one order line. The bridge table allows us to link the repeating dimension to the facts, but as noted in the post, care must be taken not to double count.
But we are not discussing entity-relationship modeling. In a dimensional model, this kind of relationship is allowed. Despite what you may think, it is also compatible with your relational database management system. The figure above can be implemented as a physical design, and it will work.
Unfortunately, some of our software tools do not understand this. Tool Problems Many of the software products we use in data warehousing were originally developed for transaction processing systems. Because of this lineage, the many-to-many relationship can be a problem. This is a problem for the model pictured above. Dynamic query mode does not allow a detail query which projects items from subjects on either side of a bridge query subject.
Solved: How to show the data in a many to many with bridge - Microsoft Power BI Community
Query 'Query1' references a bridge query subject and therefore cannot have the property 'Auto Group and Summarize' set to No. Items which compute an aggregate value cannot include the pre-filter clause. Query 'Query1' contains data item 'PrefilteredTotal' which has a pre-filter aggregate expression, this is not supported when the query references a bridge query subject.Creating a Many-to-Many Relationship in an Access Database
Average summaries within a bridge query are not supported. A bridge query that refers to a fact having its default aggregation set to average will fail with the following error. Query 'Query1' contains data item 'costs' which has an implicit average aggregate expression, this is not supported when the query references a bridge query subject.
Modeling Bridge Tables
Analytic expressions are not supported and will generate the following errors. Query 'Query1' contains data item 'theRank' which has an analytic aggregate expression, this is not supported when the query references a bridge query subject.
Query 'Query1' contains data item 'nextRow' which has running aggregate expression, this is not supported when the query references a bridge query subject.