Wes Helton Business Intelligence Portfolio

38
Wes Helton PO Box 940249, Maitland, FL 32794 (321) 948-8672 [email protected] Business Intelligence Business Intelligence Portfolio Portfolio 1

Transcript of Wes Helton Business Intelligence Portfolio

Page 1: Wes Helton Business Intelligence Portfolio

Wes HeltonPO Box 940249, Maitland, FL 32794

(321) [email protected]

Business Intelligence PortfolioBusiness Intelligence Portfolio

1

Page 2: Wes Helton Business Intelligence Portfolio

ContentsContents

2

SQL Server Integration Services (SSIS) 3

SQL Server Analysis Services (SSAS) 11

SQL Server Reporting Services (SSRS) 17

Performance Point and SharePoint Integration 21

Key Performance Indicators (KPI) 28

Documentation 32

Page 3: Wes Helton Business Intelligence Portfolio

SQL Server Integration Services (SSIS)SQL Server Integration Services (SSIS)

3Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672

Page 4: Wes Helton Business Intelligence Portfolio

Load Job Time Sheet Files Control Flow

The Load Job Time Sheet control flow has a for each loop container that loops through each file name and processes the job time sheet files. At the completion of the task it sends an email notification whether load was successful or failed and adds any invalid record files as email attachments.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 4

Page 5: Wes Helton Business Intelligence Portfolio

Load Job Time Sheet Files Data Flow

The Load Job Time Sheet data flow task reads data from a CSV file and verifies the Employee Master and Job Master exists. The task also verifies the Job Master record is not closed or work date is greater than job closed date. If the record fails validation then the time sheet record is written to an invalid file. The task performs a lookup for the job time sheet to find a match. If the data is not found then a new row is added to the table. If the data is found and the data is different then it updates the existing row. The file path for the input data and invalid logs are stored in variables FolderPathData and FolderPathLog. These values are configured in the DtsConfig file to allow for changes in the environment.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 5

Page 6: Wes Helton Business Intelligence Portfolio

Load Job Time Sheet Files Script Task

The Main subroutine that calls functions to increment total counters in variables and add email attachments of filenames with invalid data. The routine is wrapped in a Try Catch returning a task result of success or if there is an error then firing a error event with the error message and returning a task result of failure.

Imports SystemImports System.DataImports System.MathImports System.IOImports Microsoft.SqlServer.Dts.Runtime Public Class ScriptMain Public Sub Main() Try IncrementCounter("CountProcessed", "AccumProcessed") IncrementCounter("CountAddNew", "AccumAddNew") IncrementCounter("CountChanged", "AccumChanged") IncrementCounter("CountInvalidEmployee", "AccumInvalidEmployee") IncrementCounter("CountInvalidJobMaster", "AccumInvalidJobMaster") IncrementCounter("CountInvalidJobClosed", "AccumInvalidJobClosed") IncrementCounter("AccumTimeSheets") AddEmailAttachments("FolderPathLog", "FileNameInvalidEmployee", "CountInvalidEmployee", "EmailAttachments") AddEmailAttachments("FolderPathLog", "FileNameInvalidJobMaster", "CountInvalidJobMaster", "EmailAttachments") AddEmailAttachments("FolderPathLog", "FileNameInvalidJobClosed", "CountInvalidJobClosed", "EmailAttachments") Dts.TaskResult = Dts.Results.Success Catch ex As Exception Dts.Events.FireError(0, "ETL: Main", ex.Message, "", 0) Dts.TaskResult = Dts.Results.Failure End Try End Sub

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 6

Page 7: Wes Helton Business Intelligence Portfolio

Load Job Time Sheet Files Script Task (Cont’)

The script task uses function overloading with two overload methods called IncrementCounter. The first overload method accepts one string parameter and the second overload accepts two string parameters. The first call method increments the accumulator variable by 1 and is used for counting the number of files processed. The second call method increments the accumulator variable by the counter variable and is used for counting the total number of records processed. Both methods use the VariableDispensor for variable locking.

Private Function IncrementCounter(ByVal accumCounter As String) As Boolean Dim vars As Variables Try Dts.VariableDispenser.LockForWrite(accumCounter) Dts.VariableDispenser.GetVariables(vars) vars(accumCounter).Value = CInt(vars(accumCounter).Value) + 1 Catch ex As Exception Dts.Events.FireError(0, "ETL: IncrementCounter", ex.Message, "", 0) Finally vars.Unlock() End Try End Function Private Function IncrementCounter(ByVal counter As String, ByVal accumCounter As String) As Boolean Dim vars As Variables Try Dts.VariableDispenser.LockForRead(counter) Dts.VariableDispenser.LockForWrite(accumCounter) Dts.VariableDispenser.GetVariables(vars) vars(accumCounter).Value = CInt(vars(accumCounter).Value) + CInt(vars(counter).Value) Catch ex As Exception Dts.Events.FireError(0, "ETL: IncrementCounter", ex.Message, "", 0) Finally vars.Unlock() End Try End Function

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 7

Page 8: Wes Helton Business Intelligence Portfolio

Load Job Time Sheet Files Script Task (Cont’)

This script task function accepts four parameters: full folder path, file name, counter and email attachments. If the counter has a value greater than zero and the file name exists the file is appended to the email attachment variable. If the counter is zero and the file name exists then the file is deleted. The method uses the VariableDispensor for variable locking.

Private Function AddEmailAttachments(ByVal folderPath As String, ByVal fileName As String, ByVal invalidCounter As String, ByVal emailAttachments As String) As Boolean

Dim vars As Variables Try Dts.VariableDispenser.LockForRead(folderPath) Dts.VariableDispenser.LockForRead(fileName) Dts.VariableDispenser.LockForRead(invalidCounter) Dts.VariableDispenser.LockForWrite(emailAttachments) Dts.VariableDispenser.GetVariables(vars) Dim fileNameFullPath As String = CStr(vars(folderPath).Value) + CStr(vars(fileName).Value) If CInt(vars(invalidCounter).Value) <> 0 Then If File.Exists(fileNameFullPath) Then vars(emailAttachments).Value = CStr(vars(emailAttachments).Value) + fileNameFullPath + "|" End If Else If File.Exists(fileNameFullPath) Then File.Delete(fileNameFullPath) End If End If Catch ex As Exception Dts.Events.FireError(0, "ETL: AddAttachments", ex.Message, "", 0) Finally vars.Unlock() End Try End FunctionEnd Class

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 8

Page 9: Wes Helton Business Intelligence Portfolio

Load Client Master Control Flow The Load Client Master control flow task processes the County Master and Client Master data. At the completion of the task it sends an email notification whether load was successful or failed and adds any invalid record files as email attachments.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 9

Page 10: Wes Helton Business Intelligence Portfolio

Load Client Master Data Flow

The Load Client Master data flow task reads data from an Excel file and verifies the County Master exists. If the record fails validation then the client master record is written to an invalid file. The task performs a lookup to find a match in the client master table. If the data is not found then a new row is added to the table. If the data is found and the data is different then it updates the existing row. The file path for the input data and invalid logs are stored in variables FolderPathData and FolderPathLog. These values are configured in the DtsConfig file to allow for changes in the environment.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 10

Page 11: Wes Helton Business Intelligence Portfolio

SQL Server Analysis Services (SSAS)SQL Server Analysis Services (SSAS)

11Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672

Page 12: Wes Helton Business Intelligence Portfolio

All Works Cube

View of the All Works cube structure including the measure groups, dimensions and logical view of the data for the cube. The list of measure groups include Job Summary, Job Overhead Summary, Job Material and Job Labor. The list of dimensions include Job Master, Overhead, Material Types, Employees and Date Calendar.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 12

Page 13: Wes Helton Business Intelligence Portfolio

Job Master Dimension

View of the Job Master dimension structure including the attributes, hierarchies and logical view of the data for the dimension. In this dimension there are two hierarchies, Client Groups and Client Geography, which efficiently organizes the data and allows the user to explore the data from a high level to a more detail level.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 13

Page 14: Wes Helton Business Intelligence Portfolio

All Works Calculations

View of the calculated members contained in the MDX script for the All Works cube. The list of calculated members for Overhead, Jobs, Profit and Receivables. They extend the functionality of the cube and are used for business KPIs, Reports and MDX queries.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 14

Page 15: Wes Helton Business Intelligence Portfolio

All Works KPIs

View of the KPIs contained in the All Works cube. The list of KPIs include comparison measures for Open Receivables, Growth in Jobs, Overhead Percent, Profit Percent and Overhead Category Percent. KPIs are often evaluated over time and allows the business to analyze, examine and manage their predefined business goals.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 15

Page 16: Wes Helton Business Intelligence Portfolio

MDX Query

-- ===============================================================================-- Author: Wes Helton-- Create date: January 29, 2009-- Description: Calculates the total costs, the total profit, and total profit % for each individual job.---- 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-- ===============================================================================WITHMEMBER [TotalCosts] AS SUM( { [Total Labor Cost], [Total Material Cost], [Total Overhead] } ), FORMAT_STRING = "currency“MEMBER [TotalProfit] AS SUM( { [Total Labor Profit], [Total Material Profit], [Additional Labor Profit] } ), FORMAT_STRING = "currency“MEMBER [ProfitPct] AS IIF([TotalCosts] + [TotalProfit] = 0, 0, ( [TotalProfit] / ( [TotalCosts] + [TotalProfit] ) ) ), FORMAT_STRING = 'percent'

SELECT { [TotalCosts], [TotalProfit], [ProfitPct] } ON COLUMNS, { [Job Master].[Description].Members } ON ROWSFROM [All Works]

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 16

Page 17: Wes Helton Business Intelligence Portfolio

SQL Server Report Services (SSRS)SQL Server Report Services (SSRS)

17Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672

Page 18: Wes Helton Business Intelligence Portfolio

Overhead Category Report

The Overhead Category report uses the Overhead cube and selects the data by the quarter parameter and displays the total overhead for the quarter, total overhead for the previous quarter and percent increase of overhead from previous quarter for each category. The quarter parameter for the report defaults to the most recent quarter when the report is first displayed. If there is an increase in overhead from previous quarter the percent changed values are displayed in red.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 18

Page 19: Wes Helton Business Intelligence Portfolio

MDX Code for Overhead Category Report

MDX Query uses the Tail and Filter Function to Get the Latest Quarter for the Default Parameter

WITH MEMBER [Measures].[ParameterCaption] AS '[Project Overhead View].[FY Qtr].CURRENTMEMBER.MEMBER_CAPTION‘ MEMBER [Measures].[ParameterValue] AS '[Project Overhead View].[FY Qtr].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures].[ParameterLevel] AS '[Project Overhead View].[FY Qtr].CURRENTMEMBER.LEVEL.ORDINAL'

SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS, Tail(Filter([Project Overhead View].[FY Qtr].Children, [Measures].[Weekly Over Head]),1) ON ROWS FROM [Project Overhead Cube]

MDX Query uses the PrevMember to Get the Previous Quarter to Display in the Heading

WITH MEMBER [Measures].[ParameterCaption] AS '[Project Overhead View].[FY Qtr].CURRENTMEMBER.MEMBER_CAPTION' SELECT {[Measures].[ParameterCaption]} ON COLUMNS, STRTOMEMBER(@ProjectOverheadViewFYQtr).PrevMember ON ROWS FROM [Project Overhead Cube]

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 19

Page 20: Wes Helton Business Intelligence Portfolio

Employee Jobs in Date Range Report

The Employee Jobs in Date Range report uses the Labor cube and selects the data by the employee and week ending date range parameters and displays the employee, job description, hours worked and total labor for each job during the week. For each week ending date there are subtotals for the hours worked and total labor and at the end of the report a final total of hours worked and total labor.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 20

Page 21: Wes Helton Business Intelligence Portfolio

Performance Point Server andPerformance Point Server and SharePoint Server Integration SharePoint Server Integration

21Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672

Page 22: Wes Helton Business Intelligence Portfolio

Labor Analysis Report

The Labor Analysis report uses an analytical chart and analytical grid on a dashboard using Performance Point. The chart uses the Labor cube and shows the employee’s labor dollars by quarter, along with the percentage of labor for the jobs the employee worked on. The report shows each job the person worked on, the employee’s labor contribution, the total labor contribution for the job, and the employee %

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 22

Page 23: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 23

MDX Code for Labor Analysis Report

MDX Query for Labor Analysis Chart

WITHMEMBER [Measures].[Total Labor All] AS Sum( ( Filter([Job Master].[Description].Children, [Measures].[Total Labor] > 0 ), [Employees].[Full Name].[All]), [Measures].[Total Labor] )MEMBER [Measures].[Total Labor Employee] AS ( [Measures].[Total Labor],[Employees].[Full Name].CurrentMember ), FORMAT_STRING = "currency“MEMBER [Measures].[Employee Labor Pct] AS ( [Measures].[Total Labor Employee] / [Measures].[Total Labor All] ), FORMAT_STRING = "percent"

SELECT Filter( { [Project Labor View].[FY Qtr].Children },[Measures].[Total Labor Employee] > 0 ) ON COLUMNS, { [Measures].[Employee Labor Pct], [Measures].[Total Labor Employee] } ON ROWS

FROM [Project Labor Cube]WHERE ( <<FullName>> )

MDX Query for Labor Analysis Grid

WITHMEMBER [Measures].[Total Labor Job] AS ( [Measures].[Total Labor],[Job Master].[Description].CurrentMember,[Employees].[Full Name].[All] ), FORMAT_STRING = "currency“MEMBER [Measures].[Total Labor Employee] AS ( [Measures].[Total Labor],[Job Master].[Description].CurrentMember,[Employees].[Full Name].CurrentMember ), FORMAT_STRING =

"currency“MEMBER [Measures].[Employee Labor Pct] AS [Measures].[Total Labor Employee] / [Measures].[Total Labor Job], FORMAT_STRING = "percent"

SELECT { [Measures].[Total Labor Employee],[Measures].[Total Labor Job],[Measures].[Employee Labor Pct] } ON COLUMNS, NON EMPTY Order(Filter( { [Job Master].[Description].Children },[Measures].[Total Labor] > 0),[Measures].[Employee Labor Pct],BDESC) ON

ROWSFROM [Project Labor Cube]WHERE ( <<FullName>> )

Page 24: Wes Helton Business Intelligence Portfolio

Labor Report

The Labor report uses two analytical grids on a dashboard using Performance Point. The report uses the Labor cube and shows the top 10 jobs by labor dollars and top 5 employees by labor dollar for the quarter and uses a filter to select the quarter.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 24

Page 25: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 25

MDX Code for Labor Report

MDX Query for Top 10 Labor Jobs by Dollars

SELECT { [Measures].[Hoursworked], [Measures].[Total Labor] } ON COLUMNS, { TopCount( [Job Master].[Description].[Description].ALLMEMBERS, 10, [Measures].[Total Labor] ) } ON ROWS FROM [Project Labor Cube]WHERE ( <<QuarterFilter>> )

MDX Query for Top 5 Employee by Labor Dollars

SELECT { [Measures].[Hoursworked], [Measures].[Total Labor] } ON COLUMNS, { TopCount( [Employees].[Full Name].[Full Name].ALLMEMBERS, 5, [Measures].[Total Labor] ) } ON ROWSFROM [Project Labor Cube]WHERE ( <<QuarterFilter>> )

Page 26: Wes Helton Business Intelligence Portfolio

Basic Overhead by Dates

The Basic Overhead by Dates report is an Excel pivot table published on a dashboard using Excel Services. The report uses the Overhead cube and shows the total overhead by category for each quarter in the year and uses a filter to select the year.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 26

Page 27: Wes Helton Business Intelligence Portfolio

Job Profitability Chart

The Job Profitability Chart report is an Excel chart published on a dashboard using Excel Services. The report uses the Project Master cube and shows the profit dollars and profit percent for each quarter and uses a filter to select multiple counties. The profit percent is displayed as a line marker chart using dual-Y axis.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 27

Page 28: Wes Helton Business Intelligence Portfolio

Key Performance Indicators (KPI)Key Performance Indicators (KPI)

28Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672

Page 29: Wes Helton Business Intelligence Portfolio

KPI Total Profit Percent for All Clients

Calculations: [TotalCost] = [Measures].[Total Overhead] + [Measures].[Total Material Cost] + [Measures].[Total Labor Cost][TotalProfit] = [Measures].[Total Labor Profit] + [Measures].[Total Material Profit] + [Measures].[Additional Labor Profit][[ProfitPercent] = Measures].[TotalProfit] / ( [Measures].[TotalCost] + [Measures].[TotalProfit] )

KPI Value: [Measures].[ProfitPercent]KPI Status: Greater than 15 % is Good , Greater than 5 % and Less than or equal to 15 % is Warning, Less than 5 % is Bad

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 29

Page 30: Wes Helton Business Intelligence Portfolio

KPI Percent Increase in Overhead Category from One Quarter to the Previous

Calculations: [CurrentOverhead] = ( [All Works Calendar].[Fy Year - Fy Qtr].CurrentMember, [Measures].[Weekly Over Head] )[PreviousOverhead] = ( [All Works Calendar].[Fy Year - Fy Qtr].CurrentMember.Lag(1), [Measures].[Weekly Over Head] )[IncreaseOverheadPercent] = ( [CurrentOverhead] - [PreviousOverhead] ) / [PreviousOverhead]

KPI Value: [IncreaseOverheadPercent]KPI Status: Less than 10 % is Good, Greater than 10 % and Less than or equal to 15 % is Warning, Greater than 15 % is Bad

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 30

Page 31: Wes Helton Business Intelligence Portfolio

KPIs of Overhead Trend and Open Receivables on Performance Point Scorecard

The scorecard displays the KPIs for Overhead Trend, Client Financials and Construction Job Financials using the quarter selected by the filter. The Client Financials and Constructions Job Financials are Objective KPIs which rolls up KPIs for Open Receivables as Percent of Invoiced, Profit Percent and Overhead and Percent of Total Cost.

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 31

Page 32: Wes Helton Business Intelligence Portfolio

DocumentationDocumentation

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 32

Page 33: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 33

SharePoint – Create a SharePoint site and configure for Reporting and Excel ServicesCreate the SharePoint Site1.Navigate to URL: http://{Server Name}:208382. Central Administration | Application Management | SharePoint Site Management | Create Site Collection

• Title: Wes Helton Site Collection• Description: Leave blank or enter description of site• URL: http://{Server Name}/sites/2008G4_Test_WAH• Select a template: Document Workspace• Primary Site Collection Administrator User name: BISQL• Secondary Site Collection Administrator User name:• No Quota• Should return message "Return Top Level Site Create Successfully"

Configure for Report Services1. Navigate to URL: http:// {Server Name}/sites/2008G4_Test_WAH2. Site Actions | Site Settings | Site Collection Administration | Site Collection Features

• Report Server Integration Feature: Set to Active

Configure for Excel Services1. Navigate to URL: http:// {Server Name}:208382. Shared Services Administration | SharedServices1 | Excel Services Settings | Trusted File Location3. Click Add New Trusted File Location

• Address: http:// {Server Name}/sites/2008G4_Test_WAH• Location type: Windows SharePoint Services• Trusted Children: Checked• Description: Blank• Allow External Data: Trusted data connection libraries and embedded• Warn on Refresh: Uncheck• Default for all other prompts

4. Click the OK button

Page 34: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 34

AllWorks Integration Services Project documentation (partial)

Page 35: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 35

AllWorks database schema reversed engineered using Visio

Page 36: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 36

Logical Data Map for AllWorks Database data load in Excel spreadsheet (partial)

Page 37: Wes Helton Business Intelligence Portfolio

Wes Helton : Business Intelligence Portfolio : [email protected] : (321) 948-8672 37

AllWorks Labor Analysis Data Warehouse cube matrix

Page 38: Wes Helton Business Intelligence Portfolio

For more information or to setup an For more information or to setup an interview, call or email:interview, call or email:

Wes Helton(321) 948-8672 [email protected]

38