Saturday, 11 March 2017

When to use Many to Many Relationships in Multi-dimensional SSAS

In SSAS, there is one thing that is really quite confusing: many-to-many relationships. This is where you have two dimensions that have a many-to-many relationship between them, for example, a Student may have many classes, and a class may have many students. If you want to relate class name to student name in a pivot table, how can you do that? Well, you need a bridge table, also called a Factless Fact table, and then you need to import this as a fact table, create a measure group, which is hidden, called Count, and then in the Dimension Usage tab of the designer, define a many-to-many relationship between the two tables.

Many to many relationships cannot be created between two fact tables, in SSAS. However, you could import those Fact tables as dimensions, along with a bridge table of the kind mentioned above, and treat your facts as dimension attributes. The problem with this is that you won't be able to do summing and all the usual aggregations that you can in a fact table.

No comments:

Post a Comment