ms bi ssas project portfolio
TRANSCRIPT
1
Constructing Construction Statistics
Available through SSAS
* * *
Author: John Stires
October 10, 2008
2
Table of Contents
I. Overview ................................................................................................................................................ 3
II. Component Parts .................................................................................................................................. 3
A. Creating the Cube ............................................................................................................................. 3
1. Setting up the Data Source Connection to the Database. ................................................................ 3
2. Build the cube ................................................................................................................................. 3
3. Created Dimensions ........................................................................................................................ 3
B. MDX Querie ...................................................................................................................................... 5
1. Job Summaries ................................................................................................................................ 5
2. Overhead Summaries ...................................................................................................................... 6
1. Materials Summaries ...................................................................................................................... 7
2. Labor Summaries ............................................................................................................................ 7
C. Key Performance Indicators ( KPIs)............................................................................................... 8
1. % Open Receivables ....................................................................................................................... 8
2. Increase in the Number of Jobs ....................................................................................................... 8
3. Percent Overhead ............................................................................................................................ 8
4. Percent Profit. ................................................................................................................................. 9
5. Increase in Percent of Overhead by Category. ................................................................................ 9
Appendix A - All Works DS Data Source View ..................................................................................... 11
Appendix B - All Works Cube Design View .......................................................................................... 12
Appendix C MDX Job Master Queries .................................................................................................. 13
Appendix D MDX Overhead Queries .................................................................................................... 25
Appendix E MDX Materials Queries ..................................................................................................... 28
Appendix F MDX Labor Queries ........................................................................................................... 32
Appendix G KPIs (Key Performance Indicators .................................................................................. 37
3
I. Overview
This project creates the Cubes and Dimensions necessary to generate MDX Queries and Key
Performance Indicators (KPIs) for a simulated Construction company. The focus of the data for
this project is on data for labor, materials, overhead, and summarized job information. The data
was loaded from a zipped database and a cube and its associated dimension and hierarchies. The
Data Source and Data Source Views were defined. Once this was done, the cube was created and
then dimensions were created in order to organize the data in such a way as to enable the MDX
queries and KPIs to perform their functions efficiently.
The net result was a collection of MDX queries and KPIs showing critical business information in
a way that it can be quickly analyzed.
II. Component Parts
There were three main component parts to this project:
Creating the cube
Creating the MDX Queries
Creating the KPIs
A. Creating the Cube In creating the cube a data base was supplied containing all of the necessary data to carry this
project forward. The database name was SSASStudentProject.
1. Setting up the Data Source Connection to the Database. a) The connection was set to the SSASStudentProject database located in the folder:
C:\SetFocusBIProjects\StudentVersion\SSASStudentProject\SSASStudentProject\bi
n
b) A Data Source View was set up to design the chart showing the data relationships and
establishing the Fact Tables (Measures) and the Dimensions. This chart can be viewed in
Appendix A.
2. Build the cube once the database connect had been established and the Data
Source View created, the Cube, AllWorks Cube was created. As this was
accomplished, a basic chart was created showing the relationships of the data
within the cube. The wizard was used to create the cube and then the individual
elements were adjusted as necessary for producing the desired queries and KPIs.
This Cube Design chart can be seen in Appendix B.
3. Created Dimensions
a) Measures Fact Tables.
(1) Job Labor Facts
(a) Hoursworked
(b) Job Labor Facts
(c) Total Labor
(2) Job Material Facts
(a) Job Material Facts Count
(b) Purchase Amount
(3) Job Overhead Summary Facts
(a) Job Overhead Summary Facts Count
4
(b) Weekly Over Head
(4) Job Summary Facts
(a) Additional Labor Profit
(b) Amount Received
(c) Hours Worked
(d) Invoice Amount
(e) Job Summary Facts Count
(f) Total Labor Cost
(g) Total Labor Profit
(h) Total Material Cost
(i) Total Material Profit
(j) Total Overhead
b) Dimensions
(1) All Works Calendar
(a) Qtr
(b) Weekend Date
(c) Year
(d) Calendar (Hierachy)
(i) Year
(ii) Qtr
(iii)Weekend Date
(2) Client Groupings
(a) Client Groupings
(b) Grouping Name
(3) Clients
(a) Clients.Account No
(b) Clients.Client Image
(c) Clients.Client Name
(d) Clients.Clients
(e) Clients.Project Manager
(f) Clients.Hierarchy
(i) Clients
(4) Clients – County PK
(a) Clients – County PK.Coutny
(b) Clients – County PK.County Name
(5) County
(a) County.County
(b) County.County Name
(6) Division
(a) Division
(b) Division Name
(7) Employees
(a) Cell Phone
(b) Employee Flag
(c) Employees
(d) First Name
5
(e) Full Name
(f) Last name
(8) Job Master
(a) Additional Overhead Pct
(b) Client Job
(c) Description
(d) Job Closed
(e) Job Closed Date
(f) Job master
(g) Material Markup Pct
(9) Job Master – Client PK
(a) Job Master – Client PK.Account No
(b) Job Master – Client PK.Client Image
(c) Job Master – Client PK.Client Name
(d) Job Master – Client PK.Clients
(e) Job Master – Client PK.Project manger
(f) Job Master – Client PK.Hierarchy (Hierarchy)
(i) Job Master – Client PK.Clients
(10) Job Master – Client PK – County PK
(a) Job Master – Client PK – County PK.County
(b) Job Master – Client PK – County PK.County Name
(11) Material Types
(a) Description
(b) Material Types
(12) Overhead
(a) Description
(b) Overhead
c) Hierarchies
Two dimensions had hierarchies.
(1) All Works Calendar
Three hierarchies were created for the calendar based on:
(a) Year
(b) Qtr
(c) Weekend Date
(2) Clients
A single hierarchy based on the Client ID.
(3) Job Master – Client PK
A single hierarchy based on Job Master – Client PK.Clients
B. MDX Queries The MDX queries are grouped in to several categories. They will be presented in those
groupings. An example of the display of each can be found in the appendixes as indicated in
the description for each query.
1. Job Summaries
Screen prints for this group can be found in Appendix C. a) JobSummary01.mdx
Retrieve total labor costs by Client
6
b) JobSummary02.mdx
Retrieves total labor costs by Client, and filters out any NULL values
c) JobSummary03.mdx
Retrieve total labor costs by County
d) JobSummary04.mdx
Retrieve total labor costs by Division
e) JobSummary05.mdx
Retrieve total labor costs by Client Account grouping
f) JobSummary06.mdx
By client, retrieve total labor cost, total material cost, and total overhead.
g) JobSummary07.mdx
Do the same (retrieve 3 measures) and add a 4th measure, a calculated measure, that adds
all three costs.
h) JobSummary08.mdx
Retrieve and calculate the total costs, the total profit, and total profit %, for each
individual job. The three re calculated as follows:
Total costs = total labor cost +
total material cost +
total overhead cost
Total profit = labor profit +
material profit +
additional labor overhead profit
Total profit % = (total profit / (total cost + total profit))*100
i) JobSummary09.mdx
By client, retrieves and calculate the total costs, the total profit, and total profit %, for
each individual job. The three re calculated as follows:
Total costs = total labor cost +
total material cost +
total overhead cost
Total profit = labor profit +
material profit +
additional labor overhead profit
Total profit % = (total profit / (total cost + total profit) )*100
j) JobSummary10.mdx
By client, displays a count of Jobs.
k) JobSummary11.mdx
Retrieve all Clients with a Total Labor cost to date greater than 5,000, and the word 'INC'
appears in the client name
l) JobSummary12.mdx
List the jobs that make up the top 30% of total invoice amount.
2. Overhead Summaries a) JobOverHead01.mdx
Shows Overhead by Overhead Category for Q3 and Q4 2005 (hint, use the FY Qtr as a
dimension).
7
b) JobOverHead02.mdx
Shows Overhead by Overhead Category for Q3 and Q4 2005, and also show the % of
change between the two.
c) JobOverHead03.mdx
Shows Overhead by Overhead Category for all of 2005, order by Overhead Dollar
amount descending.
1. Materials Summaries a) The result set should have 1 column for the purchase amounts for Fuel, Materials, and
petty Cash.
b) JobOverMaterials02.mdx
Shows Material purchase amounts for 2005, broken out by Material Purchase type and
client.
c) JobOverMaterials03.mdx
Shows a list of total client material purchases for 2005, in descending purchase amount
order. The result set should show at the top which client required the most materials.
d) JobOverMaterials04.mdx
Shows jobs in order of purchase amount and then show the breakdown in each job of
material type (for instance, Job A, total purchase amount, amount for fuel, amount for
materials, amount for petty cash, etc.). The general order should be by total purchase
amount, so that the top of the result set shows the jobs that required the highest purchase
amounts.
2. Labor Summaries a) JobOverLabor01.mdx
Lists Hours Worked and Total Labor for each employee for 2005, along with the labor
rate (Total labor / Hours worked).
b) JobOverLabor02.mdx
Lists Hours Worked and Total Labor for each employee for 2005, along with the labor
rate (Total labor / Hours worked). The listing will sort the employees by labor rate
descending, to see the employees with the highest labor rate at the top.
c) JobOverLabor03.mdx
For 2005, show Total Hours worked, total labor dollars, and total labor rate for
contractors (employee flag is false) and employees (employee flag is true).
d) JobOverLabor04.mdx
For 2005, this shows the job and the top three employees who worked the most hours.
Show the jobs in job order, and within the job show the employees in hours worked
order.
e) JobOverLabor04.mdx
Shows All employees for 2005 Q4, and four periods ago, for total hours worked in the
Quarter.
8
C. Key Performance Indicators ( KPIs)
Five KPIs were created using the Allworks Cube and its associated dimensions.
They are briefly described below. Where possible, when a division provides that
possibility for the potential of a “divde by zero” condition, checks are made and steps
taken to avoid output errors. If the denominator turn out to be a zero, the out is
converted to 100%.
1. % Open Receivables This KPI shows, by client, the persent of receivable that are outstanding. The staus
display displays the values and status by client. See Appendix G to see a screen print of
this KPI. a) Measures and Dimensions
(1) Measures
(a) Invoice Amount
(b) Amount Received
b) Dimension N/A
(1) Basic formula Open Receivables = Invoice Amount / Amount Received
c) Status Indicator is the Traffic Light. The status values are:
(1) Good = 0 to 10%
(2) Warning = >10% to 20%
(3) Bad = > 20%
2. Increase in the Number of Jobs This KPI displays the change in the number of jobs by client for the time period of the 2
nd
quarter of 2006 from the previous quarter. a) Measures and Dimensions
(1) Measures
(a) Job Summary Facts Count
(2) Dimension(s)
(a) All Works Calendar
b) Basic formula
Change in number of Jobs = Job Summary Facts Count of the current quarter
- Job Summary Facts Count of the previous quarter
c) Filter
There is a filter in the Excel spreadsheet to select for the 2nd quarter of 2006.
d) Status Indicator is the Traffic Light. The status values are:
(a) Good = Greater than 0
(b) Okay = 0 - No Change on the job count
(c) Bad = > less than 0 (jobs lost)
3. Percent Overhead This KPI displays the percent of overhead by job for all jobs. a) Measures and Dimensions
9
(1) Measures
A calculated member is used for the sum of the Measures for Total Cost.
(a) Total Overhead
(b) Total Material
(c) Total Labor Cost
(2) Dimension(s)
N/A
b) Basic formula
Percent Overhead = Total Overhead / Total Cost
(1) Status Indicator is the Traffic Light.. The status values are:
(a) Good = 0 to 10%
(b) Warning = Greater than 10% to 15%
(c) Bad = Greater than 15%
4. Percent Profit This KPI displays the percent of profit for all clients.. a) Measures and Dimensions
(1) Measures
A calculated member is used for the sum of the Measures for Total Cost.
(a) Total Overhead
(b) Total Material
(c) Total Labor Cost
(2) Dimension(s)
N/A
b) Basic formula
Percent Overhead = Total Overhead / Total Cost
(1) Status Indicator is the Traffic Light.. The status values are:
(a) Good = 0 to 10%
(b) Warning = Greater than 10% to 15%
(c) Bad = Greater than 15%
5. Increase in Percent of Overhead by Category This KPI displays the change in the persent of Overheadt for the time period of the 2
nd
quarter of 2006 from the previous quarter. a) Measures and Dimensions
(1) Measures
(a) [Job Overhead Summary Facts].[Weekly Over Head]
(2) Dimension(s)
(a) All Works Calendar
(3) Basic formula
For clarity and ease of reading a calculated member was created to represent the
Weekly Overhead for the previous quarter.
Change in Percent Overhead = (Weekly Overhead for the current quarter
- Weekly Overhead for the previous quarter)
- / Weekly Overhead for the previous quarter
b) Filter
There is a filter in the Excel spreadsheet to select for the 2nd quarter of 2006.
10
c) Status Indicator is the Traffic Light. The status values are:
(a) Good = Less than 10%
(b) Okay = 10% - 15%
(c) Bad = > Greater than 15%
11
Appendix A - All Works DS Data Source View
12
Appendix B - All Works Cube Design View
13
Appendix C MDX Job Master Queries
1-1 Total Labor Costs by Client
14
1-2 Labor Costs by Client with filtering out the Nulls
15
1-3 Total Labor Costs by County
16
1-4 Total Labor Costs by Division
17
1-5 Total LaborCosts by Client Account Grouping
18
1-6 Labor, Material, and Overhead Costs by Client
19
1-7 Labor, Material, and Overhead Costs and then Total Costs by Client
20
1-8 Total Costs, Profit and Percent Profit by Job
21
1-9 Total Costs, Profit and Percent Profit by Client
22
1-10 Job Counts by Client
23
1-11 Clients with Greater than $5,000 and “INC” in Their Name
24
1-12 Top 30% Jobs by Invoice Amount
25
Appendix D MDX Overhead Queries
2-1 Overhead by Category for the Last Two Quarters of 2005
26
2-2 Overhead by Category and the Percent Change for the Last Two Quarters of 2005
27
2-3 Overhead by Category for 2005 - Highest to Lowest
28
Appendix E MDX Materials Queries
3-1 Material Purchases for Fuel, Materials, Petty Cash and Total
29
3-2 Purchase Amounts by Material Type and by Client
30
3-3 Total Material Purchases By Material Type by Client Starting with the
Client with the Highest Total Purchase Amount First
31
3-4 Material Costs Ordered for Each Job
32
Appendix F MDX Labor Queries
4-1 Labor Hours Worked, Total Cost and the Labor Rate for 2005
33
4-2 Labor Hours Worked, Total Cost and the Labor Rate, Highest to Lowest
by Rate for 2005
34
4-3 Total Labor Hours Worked and Labor Costs by Employees and Contractors for 2005
35
4-4 Jobs with the Most Labor Hours and the Top Three Employees within Each Job
36
4-5 Total hours Worked for Q4 2005 and the Quarter One year Prior
37
Appendix G KPIs (Key Performance Indicators
KPI-1 Percent Open Receivables By Client
38
KPI-2 Change in the Number of Jobs by Client
39
KPI-3 Percent overhead by Job
40
KPI-4 Percent Change in Profit by Client
41
KPI-5
42