Defining a Referenced Relationship | Microsoft Docs
SQL Server Analysis Services no Azure Analysis Services. A reference dimension relationship is defined on the Dimension Usage tab of Cube. We used INNER JOIN to join FactInternetSales and DimProduct tables and the same relationship can be provided in SSAS cube which is. ssas dimension attribute relationships types of attribute relationships in ssas many to many relationship in ssas with example ssas dimension.
This leads to slower cube processing but better cube query performance. There is, however, an important thing to realize: The materialized relationship link between the facts and the correct attribute members is created during the processing of the partition, not the dimension!
Why is this important? Imagine we need to update the relationships between the facts and the referenced dimension.
Referenced Relationship Type in SSAS
We can no longer simply process the dimension. The link to the older referenced dimension attribute member still exists in the partition! The partition must be processed!
If the relationships changed in the referenced dimension, you could find yourself forced to process more than just the most recent partition in order to ensure the relationships between the facts and the referenced dimension are correct. We could leave the option to materialize the relationship unchecked.MSBI - SSAS - Dimension Usage - Many to Many Relationship
The downside to this is that query performance will suffer since the member will need to be looked up on the fly. The upside is that processing will be faster and we no longer need to process the partition to update the relationship since its looked up at query time. But there is also a gotcha with using un-materialized referenced dimension relationships.
Aggregations can not be created for a referenced dimension when the relationship is not materialized.
This is by design. An aggregation should not be created which is possible to do manually for an un-materialized referenced dimension relationship because the relationship is resolved at query time. But what happens with the TSQL query during processing of the measure group? This referenced relationship between the Reseller Sales measure group is materialized.
Define a Referenced Relationship and Referenced Relationship Properties | Microsoft Docs
In the Intermediate dimension list, select Reseller. The underlying table for the Geography dimension is linked to the fact table through the underlying table for the Reseller dimension. In the Reference dimension attribute list, select Geography Key, and then try to select Geography Key in the Intermediate dimension attribute list.
Notice that Geography Key does not appear in the Intermediate dimension attribute list. This is because the GeographyKey column is not defined as an attribute in the Reseller dimension. In the next task, you will solve this problem by defining an attribute that is based on the GeographyKey column in the Reseller dimension. Defining the Intermediate Dimension Attribute and the Referenced Dimension Relationship Open Dimension Designer for the Reseller dimension, and view the columns in the Reseller table in the Data Source View pane, and view the defined attributes in the Reseller dimension in the Attributes pane.
Notice that although GeographyKey is defined as a column in the Reseller table, no dimension attribute is defined in the Reseller dimension based on this column. Geography is defined as a dimension attribute in the Geography dimension because it is the key column that links the underlying table for that dimension to the fact table. The Geography Key attribute in the Reseller dimension will only be used to link the Geography dimension to the Reseller Sales fact table.
Because it will not be used for browsing, there is no value in defining this attribute hierarchy as visible. Additionally, ordering and optimizing the attribute hierarchy will only negatively affect processing performance.
Gotchas With Referenced Dimensions
However, the attribute must be enabled to serve as the link between the two dimensions. In the Reference dimension attribute list, select Geography Key, and then select Geography Key in the Intermediate dimension attribute list.
- The Conclusion
- About AlbertoFerrari
- Dimensioning Reseller Sales by Geography
Notice that the Materialize check box is selected. Materializing the dimension attribute link causes the value of the link between the fact table and the reference dimension for each row to be materialized, or stored, in the dimension's MOLAP structure during processing. This will have a minor effect on processing performance and storage requirements, but will increase query performance sometimes significantly.
Notice that the Geography cube dimension is now linked to the Reseller Sales measure group.
The icon indicates that the relationship is a referenced dimension relationship. Change the name of this cube dimension to Reseller Geography. Because this cube dimension is now linked to the Reseller Sales measure group, users will benefit from explicitly defining its use in the cube, to avoid possible user confusion. When deployment has successfully completed, click the Browser tab in Cube Designer for the Analysis Services Tutorial cube, and then click the Reconnect button.
Notice that the Reseller Sales-Sales Amount measure is now correctly dimensioned by the Country-Region attribute of the Geographies user-defined hierarchy, as shown in the following image.