Parent-Child Dimension - Part 1

Parent-Child dimension is a type of dimension that I did not know before (yes we can not know everything), but I had the opportunity to use it as part of a project I worked on; So, I thought it would be a good idea to share with you what I learned about this dimension.

In order to better explain how to create this type of dimension and the options, you need to understand the context of the example which is part of this article.

I have a dimension table called DimFamily in my Data warehouse, it is a table that contains the list of families (categories) of a product organized according to a descendant hierarchy and which is defined in this way:

Indeed, creating our Parent-Child dimension is based on two columns FamilyId and FamilyParentId, FamilyId is the key that identifies each member, and the FamilyParentId column called parent key column identifies the parent of each member, together define the parent-child relationship between the members of the dimension.

Turning now to the Cube part (SSAS), we first create the table in the DSV :

It should be noted that the relationship between the two DataColumns is source=FamilyParentId and Destination=FamilyId.

Then, creating the dimension from the dsv, BIDS automatically detects that the usage property of FamilyParentId is in Parent.

After the dimension process, here is the result :

We can see that families without parents have a higher level.

To go further in this subject, we will address in the second part of this article the properties of the dimension Parent-Child, So go You can consult it by clicking here..

Leave a comment

Leave a Reply

Your email address Will not be published. Required fields are marked *