38
BUSINESS INTELLIGENCE PORTFOLIO Chris Seebacher September 11, 2009 [email protected]

Chris Seebacher Portfolio

Embed Size (px)

DESCRIPTION

Slidshow presentation of SetFocus Business Intelligence Masters Program class I took July-Sept of 2009.

Citation preview

Page 1: Chris Seebacher Portfolio

BUSINESSINTELLIGENCE

PORTFOLIOChris Seebacher

September 11, [email protected]

Page 2: Chris Seebacher Portfolio

Table of Contents

Contents Page

Data Modeling 3

SQL Programming 6

SQL Server Integration Services (SSIS) 9

SQL Server Analysis Services (SSAS) 13

MDX Programming 20

SQL Server Reporting Services (SSRS) 24

MS Performance Point Server (PPS) 27

MS Office Excel Services 2007 31

MS Office SharePoint Server 2007 (MOSS) 34

This portfolio contains examples that were developed while participating in the SetFocus Microsoft Business Intelligence Masters Program.

Page 3: Chris Seebacher Portfolio

DATA MODELING

Page 4: Chris Seebacher Portfolio

Relational Physical Model of the database used in a team project.

Page 5: Chris Seebacher Portfolio

Data Model of a Star Schema used to create a staging area to import data for a project.

Page 6: Chris Seebacher Portfolio

SQL PROGRAMMING

Page 7: Chris Seebacher Portfolio

This query returns all publishers with books that are currently out of stock,quantities still needed, and order status, ordered by greatest quantity needed first

SELECT books.ISBN, title as [Book Title], PUBLISHER, QUANTITYORDERED-QUANTITYDISPATCHED AS [Quantity Needed], orders.orderid, case

when orderdate+3 < getdate() and quantityordered>quantitydispatchedthen 'Needs Review' else 'Standard Delay'

end AS [STATUS]FROM BOOKS inner join ORDERITEMS on books.isbn=orderitems.isbninner join orders on orderitems.orderid=orders.orderidWHERE QUANTITYORDERED>QUANTITYDISPATCHED and stock=0group by books.ISBN, title, PUBLISHER, orderdate, orders.orderid, quantityordered,

quantitydispatchedorder by [quantity needed] desc

Page 8: Chris Seebacher Portfolio

This query determines the list of countries from which orders have been placed, the number of orders and order items that have been had from each country, the percentages of the total orders, and the percentages of total order items received from each country--Create temporary table select

[Country], count(OrderNum) as [Total Orders], sum(QuantityOrdered) as [Total Items Ordered] into #C_Totals

from(select right(address, charindex(' ',reverse(address))-1) as 'Country', customers.customerID , orders.orderID as 'OrderNum', orderItems.orderItemID, case

when QuantityOrdered is nullthen 0else QuantityOrderedend as QuantityOrdered

from ordersinner join orderItems

on orders.orderID=orderItems.orderIDright join customers

on orders.customerID=customers.customerIDgroup by QuantityOrdered,

customers.customerID, address, orders.orderID, orderItems.OrderItemID

) as C_Ordersgroup by [Country] with rollup--Query temporary table to extract, calculate and format data appropriatelyselect [Country], [Total Orders], [Total Items Ordered], (convert(numeric(10,4),([Total Orders]/(select convert(numeric,[Total Orders]) from #C_Totals where [Country] is null)))*100) as [% of Total Orders] , (convert(numeric(10,4),([Total Items Ordered]/(select convert(numeric,[Total Items Ordered]) from #C_Totals where [Country] is null)))*100) as [% of Total Items Ordered] from #C_Totalswhere [Country] is not null group by [Country], [Total Orders], [Total Items Ordered] -- Should clean up afterwardsdrop table #C_Totals

Page 9: Chris Seebacher Portfolio

SQL SERVER INTEGRATION SERVICES

(SSIS)

Page 10: Chris Seebacher Portfolio

This is the data flow and control flow for the Job Time Sheets package. This package imports multiple csv files doing checks to insure data

integrity and writing rows that fail to an error log file for review.

Page 11: Chris Seebacher Portfolio

This is the script that tracks how many records were processed for the Job Time Sheets package. It breaks them up into Inserted, Updated and Error categories. These totals are used in the email that is sent when processing is completed.

' 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 SystemImports System.DataImports System.MathImports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMainPublic Sub Main() Dim InsertedRows As Integer = CInt(Dts.Variables("InsertedRows").Value) Dim ErrorRows As Integer = CInt(Dts.Variables("ErrorRows").Value) Dim RawDataRows As Integer = CInt(Dts.Variables("RawDataRows").Value) Dim UpdatedRows As Integer = CInt(Dts.Variables("UpdatedRows").Value) Dim InsertedRows_fel As Integer = CInt(Dts.Variables("InsertedRows_fel").Value) Dim ErrorRows_fel As Integer = CInt(Dts.Variables("ErrorRows_fel").Value) Dim RawDataRows_fel As Integer = CInt(Dts.Variables("RawDataRows_fel").Value) Dim UpdatedRows_fel As Integer = CInt(Dts.Variables("UpdatedRows_fel").Value)

Dts.Variables("InsertedRows").Value = InsertedRows + InsertedRows_fel Dts.Variables("ErrorRows").Value = ErrorRows + ErrorRows_fel Dts.Variables("RawDataRows").Value = RawDataRows + RawDataRows_fel Dts.Variables("UpdatedRows").Value = UpdatedRows + UpdatedRows_fel Dts.TaskResult = Dts.Results.Success

End Sub

End Class

Page 12: Chris Seebacher Portfolio

This is the data flow of a package the merged data from multiple tables together in order to create a fact table

for a cube.

Page 13: Chris Seebacher Portfolio

SQL SERVER ANALYSIS SERVICES

(SSAS)

Page 14: Chris Seebacher Portfolio

The AllWorks database deployed as a cube using SSAS

Page 15: Chris Seebacher Portfolio

Browsing the AllWorks data cube

Page 16: Chris Seebacher Portfolio

Creating Calculated Members for use in KPIs and Excel Reports

Page 17: Chris Seebacher Portfolio

Creating Key Performance Indicators (KPIs) to show visually goals, trends

and changes in tracked metrics

Page 18: Chris Seebacher Portfolio

Use of a KPI in Excel to show Profits against projected goals.

Page 19: Chris Seebacher Portfolio

Partitioning the cube to separate archival data from more frequently accessed data. Also Aggregations were setup here to further enhance storage and query performance.

Page 20: Chris Seebacher Portfolio

MDX PROGRAMMING

Page 21: Chris Seebacher Portfolio

For 2005, show 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

SELECT[Measures].[Hoursworked]ON COLUMNS,non empty Order(Generate([Job Master].[Description].[Description].members,

([Job Master].[Description].currentmember,TOPCOUNT([Employees].[Full Name].[Full Name].members,3,[Measures].[Hoursworked]))),[Measures].[Hoursworked],DESC)

on rowsFROM AllworksWHERE[All Works Calendar].[Fy Year].&[2005]

Page 22: Chris Seebacher Portfolio

Show Overhead by Overhead Category for currently selected quarter and the previous quarter, and also show the % of change between the two.

WITHMEMBER [Measures].[Previous Qtr] AS

([Measures].[Weekly Over Head],ParallelPeriod ([All Works Calendar].[Fy Year - Fy Qtr].level

,1,[All Works Calendar].[Fy Year - Fy Qtr].currentmember) ),FORMAT_STRING = '$#,##0.00;;;0‘

MEMBER [Measures].[Current Qtr] AS([Measures].[Weekly Over Head],[All Works Calendar].[Fy Year - Fy Qtr].currentmember),FORMAT_STRING = '$#,##0.00;;;0‘

MEMBER [Measures].[% Change] ASiif([Measures].[Previous Qtr], (([Measures].[Current Qtr] - [Measures].[Previous Qtr]) / [Measures].[Previous Qtr]),NULL),FORMAT_STRING = '0.00%;;;\N\/\A‘

SELECT{[Measures].[Current Qtr], [Measures].[Previous Qtr], [Measures].[% Change]}on columns,non empty [Overhead].[Description].memberson rowsFROM AllworksWHERE [All Works Calendar].[Fy Year - Fy Qtr].[2005].lastchild

Page 23: Chris Seebacher Portfolio

List Hours Worked and Total Labor for each employee for 2005, along with the labor rate (Total labor / Hours worked). Sort the employees by labor rate descending, to see the employees with

the highest labor rate at the top.

WITHMEMBER [Measures].[Labor Rate] AS[Measures].[Total Labor]/[Measures].[Hoursworked],FORMAT_STRING = 'Currency'

SELECT{[Measures].[Hoursworked],[Measures].[Total Labor],[Measures].[Labor Rate]}ON COLUMNS,non empty Order([Employees].[Full Name].members,[Measures].[Labor Rate], BDESC)on rowsFROM AllworksWHERE[All Works Calendar].[Fy Year].&[2005]

Page 24: Chris Seebacher Portfolio

SQL SERVER REPORTING SERVICES

(SSRS)

Page 25: Chris Seebacher Portfolio

This report show an employees labor cost by weekending date with a grand total at the bottom. Cascading parameters are used

to select the employee and dates.

Page 26: Chris Seebacher Portfolio

A report of region sales percentage by category for a selected year.

Page 27: Chris Seebacher Portfolio

MS PERFORMANCE POINT SERVER (PPS)

Page 28: Chris Seebacher Portfolio

A breakdown of the labor cost of an employee by quarter. The line graph shows the percentage of labor of the employee for the quarter. The chart at the bottom shows the breakdown by

job.

Page 29: Chris Seebacher Portfolio

The custom MDX code that allows the previous report to run

Page 30: Chris Seebacher Portfolio

This scorecard has a drill down capability that will allow you to see regions, states and city Sales goals. In addition it is hot

linked to a report that shows Dollar Sales.

Page 31: Chris Seebacher Portfolio

MS OFFICE EXCEL SEVICES 2007

Page 32: Chris Seebacher Portfolio

This excel spreadsheet has taken data from a cube and created a chart. This chart and its parameter will then be published using Excel Services to make it available

on a Sharepoint server.

Page 33: Chris Seebacher Portfolio

Another chart built using Excel with data from a cube. This chart allows the tracking of sales data by Category on a selected year. In addition it tracks the selected category percentage of sales vs. the parent on a separate axis. This chart with its parameters was

published to SharePoint Server using Excel Services.

Page 34: Chris Seebacher Portfolio

MS OFFICE SHAREPOINT SERVER

(MOSS)

Page 35: Chris Seebacher Portfolio

SharePoint site created with document folders to hold Excel spreadsheets published with Excel Services, SSRS reports, and Performance Point

Dashboards. Two web parts are on the front page showing a Excel chart and SSAS KPI published through Performance Point.

Page 36: Chris Seebacher Portfolio

The previously shown Employee Labor Analysis Report deployed to SharePoiont as part of A Performance Point

Dashboard.

Page 37: Chris Seebacher Portfolio

An SSRS reported scheduled to be autogenerated using SharePoint scheduling and subsription services

Page 38: Chris Seebacher Portfolio

Excel spreadsheets and charts deployed to SharePoint using Excel Services.