1. BEVERLY
BUSINESS INTELLIGENCE PORTFOLIO
WOODWARD
2. Contents
SetFocus Business Intelligence Masters Program Project...............................................................................3
SQL Server Integration Services ............................................................................................................4
Sample Documentation for SSIS portion....................................................................................................... 5
SSIS AllWorks Project Screenshots............................................................................................................... 6
Project Master Package................................................................................................................................. 7
Control Flow.............................................................................................................................................. 7
Data Flow.................................................................................................................................................. 8
Project Time Sheets Package........................................................................................................................ 9
SQL Server Analysis Services...............................................................................................................12
Screenshot of Data Source View................................................................................................................. 13
Sample MDX queries with results:........................................................................................................14
Sample KPIs................................................................................................................................................. 19
Miscellaneous Projects in Sharepoint.....................................................................................................23
SSRS deployed to Sharepoint...................................................................................................................... 25
PPS dashboard containing 4 pages............................................................................................................. 26
2|Page
3. SetFocus Business Intelligence Masters Program Project
Core technologies used in the program:
• Microsoft SQL Server 2005
• Microsoft SQL Server 2005 Integration Services (SSIS)
• Microsoft SQL Server 2005 Analysis Services (SSAS)
• Microsoft SQL Server 2005 Reporting Services (SSRS)
• Microsoft Office SharePoint Server 2007 (MOSS)
• Microsoft Office Performance Point Server
Project Summary
Design and build a Business Intelligence solution for a simulated construction company in order to track, analyze and
report on every facet of the companies business.
Project Goals
• Using SSIS, build an ETL solution to update the SQL Server 2005 database on a nightly basis from Excel and other flat
file sources.
• Using SSAS, create a cube, with partial snowflake architecture.
• Implement a variety of MDX queries in order to manipulate and analyze the data in the cube.
• Using SSAS implement various calculations in order to built critical Key Performance Indicators(KPIs).
• Using SSRS, produce various detailed summary reports.
3|Page
4. SQL Server Integration Services
Overview of Goals for SSIS portion:
1. Create a data source using either the XML or System.Data.ODBC drivers
2. Create packages to read each source file and insert/update into AllWorksDBStudent SQL
Database. Remember that the structures may be different for each set of files (raw source data
for invoices is non-normalized, whereas SQL Database will have multiple jobs per invoice, etc.)
3. Generate an email to someemail@random.com for the results of every package, including rows
inserted and any errors generated (for example, subsequent data loads will contain child
timesheet records with an invalid parent record). The email server for SMTP connections is
someconnection0006.random.com.
4. All scheduled packages will run nightly at midnight.
5. Create a separate package to handle nightly database backups. All backups should occur nightly,
after the last transfer of source data. After the backup occurs, create another package to reindex
all files and shrink the database.
4|Page
5. Sample Documentation for SSIS portion
Package 3a: EmployeeMasterPackage.dtsx
Source File: C:SetFocusBIProjectsStudentVersionSSISStudentProjectEmployees.xls
Sheet: Employees
Target Table: AllWorksDBStudent.dbo.Employees
Log file and Log Table: C:SetFocusBIProjectsStudentVersionSSISStudentProjectLogsOnErrorLogFile.log
AllWorksDBStudent.dbo.ErrorLog
Assumption: Per instructor, data load file will not contain records with NULL key values and also the initial
data load will not contain any duplicate keys.
Notification includes the following information:
Successful email notification will include the following:
Execution start time
Total number of rows in the source file
Total number of new rows inserted
Total number of existing rows updated
Failure email notification will include the location of the SSIS Logging text detail file(C:SetFocusBIProjects
StudentVersionSSISStudentProjectPackageErrorLogsErrorLogFile.log)
Error Handling:
If there is an error, a record will be written to an error log text file for the package.
5|Page
6. SSIS AllWorks Project Screenshots
Master Package
The Master package runs all the other packages plus the nightly maintenance tasks as well.
6|Page
7. Project Master Package
Control Flow
This package created an error logging procedure for the entire project, then populated or updated
a SQL Server table and notified the relevant parties whether it was successful in its tasks.
7|Page
8. Data Flow
This is the Data Flow for the employee master package where the data is converted, totaled,
imported or updated in to the correct table. The data is also checked for errors and missing
information and logged.
8|Page
9. Project Time Sheets Package
Control Flow
This package reads multiple CSV files and populates the correct table in the SQL server, then totals
all the recorded and the emails are sent to the relevant recipients.
Here is the VB code that was used to keep track of all the totals in the Script Task:
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections,
variables, events,
' and logging features are available as static members of the Dts class.
9|Page
10. ' Before returning from this method, set the value of Dts.TaskResult to
indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.
Public Sub Main()
'
Dts.Variables(quot;TotalClosedJobRowsquot;).Value = _
CInt(Dts.Variables(quot;TotalClosedJobRowsquot;).Value) +
CInt(Dts.Variables(quot;ClosedJobRowsquot;).Value)
Dts.Variables(quot;TotalExistingRowsquot;).Value = _
CInt(Dts.Variables(quot;TotalExistingRowsquot;).Value) +
CInt(Dts.Variables(quot;ExistingRowsquot;).Value)
Dts.Variables(quot;TotalNewRowsquot;).Value = _
CInt(Dts.Variables(quot;TotalNewRowsquot;).Value) +
CInt(Dts.Variables(quot;NewRowsquot;).Value)
Dts.Variables(quot;TotalSourceRowsquot;).Value = _
CInt(Dts.Variables(quot;TotalSourceRowsquot;).Value) +
CInt(Dts.Variables(quot;SourceRowsquot;).Value)
'
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
10 | P a g e
11. Data Flow
Like the previous package this package also converts, totals, imports or updates the data into the
correct table. The data is also checked for errors and missing information and logged.
11 | P a g e
12. SQL Server Analysis Services
Overview of Goals for SSAS portion
There are three phases to the SSAS Project:
1. Create an SSAS solution in BIDS, and build four views/cubes for Project (“Job”) Master,
Project Overhead, Project Materials, and Project Labor.
2. A workshop on SSAS queries
3. Build 5 KPIs (covered in this document)
4. Deliverables for this:
a. The SSAS solution from BIDS
• Transform the OLTP database to a OLAP cube
b. The MDX queries that you create for each of the four views
• Create the calculated members for the cube
c. A screenshot of the results from each Excel KPI test (5 screen shots)
• Kpi1 through KPI5 (jpg, bmp)
12 | P a g e
13. Screenshot of Data Source View
This DSV was created in BIDS, it shows the 4 fact tables
13 | P a g e
14. Sample MDX queries with results:
Retrieve and calculate the total costs, the total profit,and total profit %, for each
individual job. The three are 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
WITH
MEMBER [Total Cost] AS ([Total Labor Cost] + [Total Material Cost] + [Total
Overhead]),
format_string = 'currency'
MEMBER [Total Profit] AS ([Total Labor Profit] + [Total Material Profit]
+ [Additional Labor Profit]), format_string = 'currency'
MEMBER [Total Profit %] AS
iif (
[Total Cost] = 0,
0,
[Total Profit] / ([Total Cost] + [Total Profit])
), FORMAT_STRING = 'percent'
SELECT
{[Total Cost], [Total Profit], [Total Profit %]}
on columns, non empty
Descendants([Job Master].[Description],[Job Master].[Description], self_and_before)
on rows
from [All Works Cube]
14 | P a g e
15. Show Overhead by Overhead Category for Q3 and Q4 2005,and also show the % of
change between the two
WITH
MEMBER
[2005_Q3] AS ([Weekly Over Head], [All Works Calendar].[Fy Qtr].PrevMember),
format_string = 'currency'
MEMBER
[%change] AS
iif(
[2005_Q3] ,
([Weekly Over Head]-[2005_Q3])/[2005_Q3],
'N/A'),
format_string = 'percent'
MEMBER
[2005_Q4] AS [Weekly Over Head],
format_string = 'currency'
SELECT {[2005_Q3],[2005_Q4],[%change]}
on columns, non empty
descendants([Overhead].[Description],[Overhead].[Description],
self_and_before)
on rows
from [All Works Cube]
WHERE [All Works Calendar].[Fy Qtr].[2005 Q4]
15 | P a g e
17. Show Material purchase amounts for 2005, broken out by Material Purchase type
and client. (for instance, Fuel for client A, B, C…Petty Cash for client A,
B, C, etc.)
WITH MEMBER
[PurchaseAmount] AS [Purchase Amount], format_string = 'currency'
SELECT
[PurchaseAmount]
on columns, non empty
{{[Material Types].[Description].[Fuel],[Material Types].[Description].
[Material],[Material Types].[Description].&[Petty Cash]}*
[Clients].[Client Name].children}
on rows
from
[All Works Cube]
WHERE [All Works Calendar].[Year].[2005]
17 | P a g e
18. Show the jobs in job order, and within the job show the employees in hours
worked order
SELECT
[HoursWorked]
on columns, non empty
generate (([Job Master].[Description].Children), CrossJoin({[Job Master].
[Description].CurrentMember},
Topcount([Employees].[Full Name].Children,3,[HoursWorked])),ALL)
on rows
from
[All Works Cube]
WHERE [All Works Calendar].[Year].[2005]
18 | P a g e
19. Sample KPIs
KPI2 – KPIIncr#ofJobs
Increase in number of Jobs from the previous period to the current period (quarter is the period in this
example)
Green = 0 or greater
Red = Less the 0
19 | P a g e
20. KPI 4 - KPIProfit
Profit % (Total Profit / (Total Cost + Total Profit))
Total Profit = Total Labor Profit + Total Material Profit + Additional Labor Profit
Total Costs = Total Labor Cost + Total Material Cost + Total Overhead
Green = Greater than 15%
Yellow = Greater than 5%, less than or equal to 15%
Red = Less than or equal to 5%
20 | P a g e
22. KPI5 – KPIOverheadTrend
% Increase in Overhead category from one period to another(in this case period is Quarter)
Green = 0-10%
Yellow = Greater then 10%, less then or equal to 15%
Red = Greater than 15%
22 | P a g e
23. Miscellaneous Projects in Sharepoint
Performance point Gauges and Chart deployed to Sharepoint
Gauge Scorecard with on condition chart on right
23 | P a g e