SSAS - MULTIDIMENSIONAL EXERCISES▼
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.
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:
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:
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:
The measure we'll show comes from the staff fact table
You've just created role-playing dimensions:
Analysis Services has created two role-playing dimensions
Save and close all of your windows.