![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a dimension with two natural hierarchies climbing up from the leaf. One hierarchy is quite deep, and is the one I'm interested in. The other hierarchy has only one level (it's a simple Attribute Hierarchy). The fact table joins to the simple attribute hierarchy, but I want to analyse using the deeper one. There is in effect a many to many relationship between the fact table and the leaves of the dimension. This information can be implied because we're descending a natural hierarchy to get from where the fact table joins to the leaf. Leaf to Attribute is a Many to One relationship, so Attribute to Leaf is One to Many and Fact to Attribute is Many to One. Many-One-Many = Many-Many. What I'd like is for Analysis Services to realise that and give me Many to Many navigation when I try to analyse the facts using the other hierarchy. Instead the analysis seems to fail, and I just get the grand total in all fields at all levels when drilling down the other hierarchy. To make things work, I'm having to set up the Many-Many relationship explicitely by creating a Measure Group using the dimension table, along with two Dimensions (one containing just the joining attribute, the other the real leaf, the joining attribute and the deep hierarchy). The result is as expected with correct summations, but it is not as neat a solution as just having AS work this out from the single dimension. I notice that attribute relationships in the February CTP version have two properties - Cardinality and Relationship Type. I can't find any documentation on these, but wonder if they'd help. I've been treating every relationship as strict - so if I know a value for an attribute I can always resolve a single value for any member properties of that attribute. Attribute to Member Property is a Many to One relationship. As an aside, this introduces subtelty as it means I must be always sure I can uniquely identify an attribute by its key - a risk where an attribute is identified by name and the name can appear in multiple places with different meaning in different parts of the natural hierarchy (two towns in the UK called Leeds for example). I am currently working around this by using each parent level as part of the composite key so "Yorkshire, Leeds" is different to "Kent, Leeds". The keys can get big in a deep hierarchy, but I see at the moment no other way to do this based on the basic principle that an attribute must be uniquely identified in order to allow AS to uniquely identify its member properties and satisfy the Many-One relationship. Thanks - Richard |
#3
| |||
| |||
|
|
If there is a many-to-many from the fact table to the leaf level; then you need to create an intermediate junction table which represents that M:M relationship. You create a measure group for that M:M junction table -- and establish relationships from there. See the AdventureWorksDW for an example. |
#4
| |||
| |||
|
|
If there is a many-to-many from the fact table to the leaf level; then you need to create an intermediate junction table which represents that M:M relationship. You create a measure group for that M:M junction table -- and establish relationships from there. See the AdventureWorksDW for an example. I have this working thanks. I've hidden the new measure (a count measure on the join) so as not to confuse the end user. While'st here - could you explain the Cardinality and Type (strict/otherwise) properties on the Attribute Relationships and check that my understanding of having to ensure an attribute key uniquely identifies an instance of that attribute is correct. I'm working on the basis that it can't infer that two instances of an attribute with the same key are different because they appear at different points in a hierarchy or have different member properties. AS2000 could do this but its model was completely different. Thanks - Richard |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Thanks a lot. A last question (honest!) - Is there anywhere I can get the documentation on what all of the properties in the properties pane do? At the moment hitting F1 just tells me how to set the associated property in C# but not what the purpose of the property is. I wonder if there are some features I'm missing or some understanding I don't quite have because there are properties I don't fully understand. |
![]() |
| Thread Tools | |
| Display Modes | |
| |