SSAS - multidimensional | Time dimensions exercise | Time dimension, linked to staff table

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Software ==> SSAS - multidimensional  (21 exercises)
Version ==> SSAS 2008 R2 and later
Topic ==> Time dimensions  (1 exercise)
Level ==> Average difficulty
Subject ==> SSAS training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The aim of this exercise is to create the following cube, showing the number of staff who joined for each calendar year:

SSAS Analysis Services exercise - Time dimensions (image 1)

The company was set up in 1967, presumably ...

If yoiu're using Analysis Services 2012 or later, you'll need to analyse your cube in Excel to see a pivot-table-style view of it similar to the one shown above.

Create a new project and data source view, and add in and join the following tables or views:

  • dimStaff (this will be our fact table for this exercise)
  • dimStore (this will be one of our two dimensions)

Auto-generate a new time table called Time to include the calendar year, starting from 1st January 1940 and running to the present day.  Remember to generate the schema!  You may now have to wait a minute or so.

Return to your data source view and create relationships between the two staff date columns and your new calendar table's date key column:

SSAS Analysis Services exercise - Time dimensions (image 2)

You'll also need to create the relationship between the staff and store tables

Create a dimension on the dimStore table, to allow browsing by quadrant.

Now create the cube as shown above, using the number of staff as your measure:

SSAS Analysis Services exercise - Time dimensions (image 3)

The measure we'll show comes from the staff fact table

You've just created role-playing dimensions:

SSAS Analysis Services exercise - Time dimensions (image 4)

Analysis Services has created two role-playing dimensions

Save and close all of your windows.

This page has 0 threads Add post