Natural Hierarchies in Period Dimension

This Period Dimension hierarchy containing Year, Quarter, Month and Date also has a yellow warning sign.

mceclip0.png

This is the present Attribute Relationship

mceclip1.png

Every attribute has a relationship to the Key Attribute which in this case is The Date.

First we delete the existing relations from The Date to Quarter Name and from The Date to Year Number.

mceclip2.png

Now we drag Month Name to Quarter Name to define that Months roll up into Quarters.

mceclip3.png

Finally we drag Quarter Name to Year Number.

mceclip4.png

Now the Attribute Relationship reflects reality – there is a one-to-many relation between each Attribute – a so called Natural Hierarchy.

Building Natural Hierarchies can improve both query and processing time – it is essential to working with performance.

The yellow warning sign has disappeared from the Hierarchy

mceclip5.png

If we try to process the Period dimension we will however receive an error.

mceclip6.png

Because Quarter Name no longer has relations to the Key attribute – but only to Year Analysis Services is not able to identify Q4 as a unique value.

We have to define a composite key to make sure that Quarter Name is unique – the Month Name has the same problem – January could be January in any year, it is not unique.

First we take care of the Quarter Name. In the Properties of Quarter Name, we change the KeyColumn:

mceclip7.png

By choosing YearNumber and QuarterNumber as Key Columns we make a composite key which is unique.

mceclip8.png

The KeyColumn is now a Collection

mceclip9.png

…so we have to specify NameColumn as Quarter Name…

mceclip10.png

…and finally we make sure that Order By has been set to Key.

mceclip11.png

On the Month Name we also create a Composite key from Year Number and Month Number.

Finally the Description property of the Hierarchy needs to be changed to reflect the changes of the attributes.

mceclip12.png

The syntax can be written in more than one way. This reflects the new composite keys at different levels.

Now we are ready to Process the Period dimension again.

After processing the Cube we should test that Dynamic Time still works in the TARGIT Client.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.