Role playing dimensions with SSAS

Please Share

Role playing dimensions in SSAS are very useful.    Lets say you have a fact table with LandingPagePathId, ExitPagePathId, PagePathId.    Now in your database you only need to have one dimension table dPath.  All your paths are then stored in the same table.

We only need to have one Dimension defined in SSAS Path which links to the dPath table.

Now In your cube.  Right click in dimensions and click add new dimension

A new window will appear.

Select your Path dimension.  When it is added if you already have one called Path it will then be named “Path 1”.  Rename this to Landing Path.

Now over on the Dimension Usage tab you have the new dimension  “Path (Landing Path)”   Path is the dimension it truly came from (Landing Path) is the name you gave it.

To define the relationship you simply have it link though LandingPagePathId instead of PagePathId.

You can make another one for ExitPagePathId the same way.   This way you only have one dimension in your project and if you make any changes to it it will be reflected in all your role playing dimensions as well.

Please Share

Linda Lawton

About Linda Lawton

My name is Linda Lawton I have more than 20 years experience working as a developer and a database expert. I have been working with several of the Google APIs, since 2012. I helping others in the On-Line community to develop with the Google APIs, by creating my own blog This and my presence on a number of On-Line developer forums lead me to be noticed by the Google Analytics API development team. I was nominated for and recently became one of the first Google Developer Experts for Google Analytics.

Leave a comment

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