SlideShare a Scribd company logo
Business Intelligence Portfolio




                                                     ™
                           SSIS               SSAS

                                      BI
                           MOSS/PPS           SSRS



                        Name: David Tufte
                        Email: David.Tufte@SetFocus.com
                        Phone: 630.209.9288




                                                     1
Table of Contents

       Project Overview ....................................................................................................... 3

       T-SQL Samples ......................................................................................................... 4

       MDX Samples ........................................................................................................... 7

       SSIS – Integration Services ....................................................................................... 7

       SSAS – Analysis Services ......................................................................................... 12

       MDX Samples ......................................................................................................... 14

       Calculated Members ................................................................................................ 17

       KPI’s, Trend Indicators, and Excel Services - Samples ............................................... 18

       SSRS – Reporting Services ....................................................................................... 21

       MOSS/PPS – Share Point and Performance Point Services .......................................... 24




© David Tufte 2009                                Business Intelligence Portfolio                                          Page 2 of 27
Project Overview
Sample Business Intelligence Project Work
This portfolio contains selected examples of my development skills in the Microsoft Business Intelligence
arena.

Core technologies covered:
 Microsoft SQL Server 2005 T-SQL
 Microsoft SQL Server 2005 MDX
 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 (PPS)

Introduction: Project Summary
Design and build a Business Intelligence solution for a simulated construction company to track employee,
customer, job order, and timesheet information.
Audience
    Business executives

    Information workers

    IT managers


Project Goals
    Define a Star Schema database using Visio (four fact tables)

    Create a Staging Database (Visio created the DDL)

    Create an ETL solution to update the SQL Server 2005 database from Excel and flat file sources using

    SSIS
    Create a Star Schema Analysis Services cube with SSAS

    Write MDX queries based on specifications

    Define Calculated Members and business Key Performance Indicators (KPIs) in SSAS

    Use Excel Services 2007 to display the cube data and the KPIs, displaying statuses and trends

    Produce detail and summary reports using SSRS

    Create score cards using MS Office Performance Point

    Implement business intelligence dashboards using MOSS 2007 (SharePoint)





© David Tufte 2009                        Business Intelligence Portfolio                           Page 3 of 27
T-SQL Samples
/*
David Tufte

Query to Join Three tables and display Title,
Item, and Copy information
*/
SELECT it.isbn
        , co.copy_no
        , co.on_loan
        , ti.title
        , it.translation
        , it.cover
FROM title ti
   INNER JOIN item it
            ON ti.title_no = it.title_no -- Join first two tables
   INNER JOIN copy co
            ON co.isbn = it.isbn          -- Join the Third table




/*
David Tufte

Combine columns to create the Full Name
*/
SELECT m.firstname + ' '
        + m.middleinitial + ' '
        + m.lastname as Name --     Combine to make Full Name
        , a.street
        , a.city
        , a.state
        , a.zip
FROM member m
      INNER JOIN adult a
            ON m.member_no = a.member_no




© David Tufte 2009                Business Intelligence Portfolio   Page 4 of 27
T-SQL Samples
/*
David Tufte

Query to combine columns to create a Full Name
And the convert a character number into a Date field
*/

SELECT m.member_no
      , m.lastname + ', '
      + m.firstname + ' '
      + m.middleinitial as Name     --    Build the Member Name
      , r.isbn
      , convert(CHAR(8), r.log_date, 1) as Date -- Convert number to Date field
FROM member m
   LEFT OUTER JOIN reservation r       -- Get member info even if no book currently out
      ON m.member_no = r.member_no
WHERE m.member_no in (250, 341, 1675)     --    Can expand list
ORDER BY m.member_no




/*
David Tufte

Query to Declare and use Variables in
a SQL statement.
*/

declare @titleString VARCHAR(30)
       , @titleNum CHAR(15)
set @titleString = 'The title is: '
set @titleNum = ', title number '
select @titleString + title + @titleNum +
       CONVERT(VARCHAR(10), title_no)
            AS 'Book Title and Number'
from title




© David Tufte 2009                Business Intelligence Portfolio               Page 5 of 27
T-SQL Samples
/*
David Tufte
Using the UNION Operator to Combine Result Sets of separate queries
*/

SELECT
       a.state
       ,a.member_no
       ,count(*) AS numkids
FROM juvenile AS j
INNER JOIN adult AS a
       ON j.adult_member_no = a.member_no
WHERE a.state = 'AZ'
       GROUP BY a.member_no,a.state
       HAVING COUNT(*) > 2
UNION
SELECT
       a.state
       ,a.member_no
       ,count(*) AS numkids
FROM juvenile AS j
INNER JOIN adult AS a
       ON j.adult_member_no = a.member_no
WHERE a.state = 'CA'
       GROUP BY a.member_no,a.state
       HAVING COUNT(*) > 3

/*
David Tufte
Use a Subquery as a Derived Table
*/
SELECT d.adult_member_no
      , a.expr_date
      , d.No_Of_Children
FROM adult AS a
INNER JOIN (
         SELECT adult_member_no
                         , COUNT(*) AS No_Of_Children
          FROM juvenile
          GROUP BY adult_member_no
          HAVING COUNT(*) > 3
         ) AS d
   ON a.member_no = d.adult_member_no




© David Tufte 2009                  Business Intelligence Portfolio   Page 6 of 27
SSIS – MDX Samples
                                     Integration Services
Integration Services
    Create packages to transfer the data from different raw data sources (Excel, CSV). Data sources are both

    normalized and non-normalized.
    Do a full load of data into MS SQL Server 2005.

    Run scheduled packages nightly to import/update any additional information.

    Perform validation to detect errors (e.g. child records with invalid parent records).

    Generate emails with the results, including rows inserted, updated. Errors are redirected to log files which

    become email attachments.
    Create a separate package to re-index and shrink the database, as well as perform nightly backups of the

    database.
Screenshots:
This particular package required reading multiple CSV files and totaling record counts for all files.
Following are the control flow and data flow screenshots.
Control flow for a package




© David Tufte 2009                         Business Intelligence Portfolio                              Page 7 of 27
SSIS – Integration Services
Notification. This is an example of the settings to send email alerts when an SSIS package completes, and
there are invalid dates in the source data. The email has the error information in the Subject line, in the body,
and includes the error file with the bad record. Similar emails are sent when data is successfully inserted as
well as when data is updated.




Sample email with error information including date and time.




© David Tufte 2009                        Business Intelligence Portfolio                            Page 8 of 27
SSIS – Integration Services
SSIS Package to read data from varying number of flat files in a folder. Running totals of rows inserted,
updated, and errors generated for all files are kept for notification after the package completes. Code on next
page.




Data flow gets repeated for each source file in the source directory.




© David Tufte 2009                        Business Intelligence Portfolio                           Page 9 of 27
SSIS – Integration Services
MSVB Script to track the row counts for successful and unsuccessful data insert or update.


' 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.
    ' 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()
         '
         '
         'TotalTimeSheetJobMasterPKRowCnt
         '
         '
         Dts.Variables(quot;TotalInsertedCurrentTimeSheetRecordRowCntquot;).Value = _
               CInt(Dts.Variables(quot;TotalInsertedCurrentTimeSheetRecordRowCntquot;).Value) _
            + CInt(Dts.Variables(quot;InsertedCurrentTimeSheetRecordRowCntquot;).Value)
         Dts.Variables(quot;TotalInvalidClosedJobTimeSheetRowCntquot;).Value = _
               CInt(Dts.Variables(quot;TotalInvalidClosedJobTimeSheetRowCntquot;).Value) _
            + CInt(Dts.Variables(quot;InvalidClosedJobTimeSheetRowCntquot;).Value)
         Dts.Variables(quot;TotalInvalidTimeSheetJobMasterPKRowCntquot;).Value = _
               CInt(Dts.Variables(quot;TotalInvalidTimeSheetJobMasterPKRowCntquot;).Value) _
            + CInt(Dts.Variables(quot;InvalidTimeSheetJobMasterPKRowCntquot;).Value)
         Dts.Variables(quot;TotalUpdatedTimeSheetRecordRowCntquot;).Value = _
               CInt(Dts.Variables(quot;TotalUpdatedTimeSheetRecordRowCntquot;).Value) _
            + CInt(Dts.Variables(quot;UpdatedTimeSheetRecordRowCntquot;).Value)
         Dts.Variables(quot;TotalInvalidEmployeePKRowCntquot;).Value = _
               CInt(Dts.Variables(quot;TotalInvalidEmployeePKRowCntquot;).Value) _
            + CInt(Dts.Variables(quot;InvalidEmployeePKRowCntquot;).Value)
         '
             Dts.TaskResult = Dts.Results.Success
       End Sub

End Class




© David Tufte 2009                       Business Intelligence Portfolio                     Page 10 of 27
SSIS – Integration Services
Master Package: This is the master control flow of all the SSIS packages for loading the Staging Database
for the AllWorks Data Source View. Several tasks can be done in parallel, while others are dependent on
previous tasks being completed.
After the database is completely loaded, some maintenance tasks are executed – the database is re-indexed,
backed-up, and compressed.
All packages were moved to the server when they were production ready, and a SQL Server Agent was set up
to run this Master Package nightly at 12:01 a.m.




© David Tufte 2009                       Business Intelligence Portfolio                        Page 11 of 27
SSAS – Analysis Services
Design the Data Source View using BIDS
   Restore the All Works Database from the Backup file.
   Create the four fact tables from the scripts provided by the DBA.
   Create the calendar table (AllWorksCalendar) from the script provided by the DBA.
   Establish database connection.
   Use “Service Account” for login credentials.
   Select the tables that we will use, including the fact tables and the dimension tables.
   All tables are indicated in the screen shot that follows.
   The DSV relationships are not completely established, and must be defined manually. Utilize the Data
    Source View (DSV) Diagram for All Works Data Source, define the primary key foreign key related
    members between tables, and save.

Here is the DSV Diagram:




All Works DSV (Data Source View)




© David Tufte 2009                      Business Intelligence Portfolio                        Page 12 of 27
SSAS – Analysis Services
Design the Cube using BIDS
    Utilize the Cube Wizard to build the All Works Cube

    Automatically create attributes and hierarchies

    Verify that the Fact tables and Dimension Tables properly identified

    Verify measures by measure group

    Verify dimensions

    Name cube and finish

    Use dimension Usage to verify dimensions used in each fact table

    Edit AllWorksCalendar dimension – rename levels and create hierarchy


Here is the Cube Design and Dimension Editor:




© David Tufte 2009                      Business Intelligence Portfolio    Page 13 of 27
MDX Samples
/*
David Tufte
Job Labor Query 04-05

Show All employees for 2005 Q4 (This Period), and four periods ago (Prior Period),
for total hours worked in the Quarter

Headers are formatted with This Period and Prior Period Titles
      This would be addressed through Report Services

Format for measures was done in the Cube Designer, Format_String Property

*/

WITH

MEMBER [Hours This Period] AS
      ([All Works Calendar].[FY Calendar].CurrentMember, [Measures].[Hoursworked])

MEMBER [Hours 4 Periods Prior] AS
      ([All Works Calendar].[FY Calendar].CurrentMember.Lag(4), [Measures].[Hoursworked])

MEMBER [Pct Change] as
CASE WHEN ISEMPTY ([Hours 4 Periods Prior]) AND ISEMPTY ([Hours This Period])
            THEN NULL -- If both periods empty, return NULL to drop empty rows
      WHEN ISEMPTY ([Hours 4 Periods Prior])
            THEN 'No Prior Period' -- Indicate Prior values empty
      WHEN ISEMPTY ([Hours This Period])
            THEN 'No Current Period' -- Indicate Current values empty
      ELSE
            ([Hours This Period] - [Hours 4 Periods Prior])/[Hours This Period]
END
, format_string = 'Percent'

Select
      { [Hours This Period], [Hours 4 Periods Prior], [Pct Change]}   This query compares the
on columns,
                                                                      hours by employee for a
NON EMPTY
                                                                      specific Year/Quarter,
      [Employees].[Full Name].Children
on rows                                                               with the hours from 4
From [All Works Cube]
                                                                      quarters previous.
Where [All Works Calendar].[FY Calendar].[Year].[2005].[2005 Q4]
                                                                      The headings are
                                                                      generic, since this query
                                                                      would check 4 previous
                                                                      time periods, for
                                                                      whatever time hierarchy
                                                                      was requested; years,
                                                                      weeks, months, etc.
                                                                      Error checking was done
                                                                      to prevent divide by
                                                                      zero, and to provide
                                                                      some additional
                                                                      information.



© David Tufte 2009                Business Intelligence Portfolio                  Page 14 of 27
MDX Samples
/*

David Tufte
Job Labor Query 04-04

For 2005, show the job and the top three employees who worked the most hours, and their
Total Labor dollar amount. Show the jobs in job order, and within the job show the
employees in hours worked order.

Format for measures was done in the Cube Designer, Format_String Property

*/

WITH

SET    [JobSet] AS        --    Set of Jobs
              ([Job Master].[Description].[All].Children
                    , [Measures].[Hoursworked])

SET [MainSet] AS
      generate          --    For Job, find the Top 3 Employees
        ( [JobSet] ,
            ( [Job Master].[Description].CurrentMember ,
                  Topcount
                  ([Employees].[Full Name].Children, 3, [Measures].[Hoursworked])
             )
        )
                                                                      This query determines for
Select                                                                each job, the three
         {
                                                                      employees that worked the
        [Measures].[Hoursworked]
                                                                      most hours on that job,
      ,[Measures].[Total Labor]
      }                                                               and indicates the total
on columns,
                                                                      labor dollar amount for that
Non Empty
                                                                      employee on that job.
      [MainSet]
on rows
                                                                      First a list {JobSet} of jobs
From [All Works Cube]
                                                                      from the year 2005 was
Where [All Works Calendar].[FY Calendar].[Year].[2005]
                                                                      created, then for each job
                                                                      in that list the top three
                                                                      employees based on hours
                                                                      worked was selected
                                                                      {MainSet}.
                                                                      This nested list is on the
                                                                      rows, and the measures
                                                                      are on the columns.
                                                                      Simply change the time
                                                                      period in the where clause
                                                                      to get this information for a
                                                                      different time period.




© David Tufte 2009                  Business Intelligence Portfolio                    Page 15 of 27
MDX Samples
/*

David Tufte
Job Summary Query 01-11

Find Total Labor Cost, Material Cost, and Labor plus Material Cost.
Retrieve all Clients with a Total Labor cost to date greater than 5,000,
and the word 'INC' appears in the client name

Format for measures was done in the Cube Designer, Format_String Property

*/

WITH
set [Filtered Set] as
      Filter (
                  [Clients].[Client Name].Members
                        , ([Inc Names] AND [Large Labor Cost])
             )

member [Inc Names] as         --    Only names that include quot;INCquot; in them
      (instr([Clients].[Client Name].CurrentMember.Name, quot;INCquot; ) > 0)

member [Large Labor Cost] as --     Select Labor Costs over $5,000
      ([Measures].[Total Labor Cost] > 5000)

member [Measures].[Labor Plus Material] as
                                                                    This query creates two
            ([Measures].[Total Labor Cost]
                                                                    lists using the Filter
             + [Measures].[Total Material Cost])
                                                                    statement; the customers
Select
                                                                    that are incorporated
      {[Measures].[Total Labor Cost]
                                                                    (“INC” in their name), and
      ,[Measures].[Total Material Cost]
      ,[Measures].[Labor Plus Material]                             the customers that have
      }
                                                                    been invoiced for Total
on columns,
                                                                    Labor Costs more than
Non Empty
      {[Filtered Set]}                                              $5000.
on rows
                                                                    These two lists are
From [All Works Cube]
                                                                    combined {Filtered Set}
                                                                    and only those customers
                                                                    that satisfy both sets of
                                                                    criteria are included in the
                                                                    report.




© David Tufte 2009                Business Intelligence Portfolio                      Page 16 of 27
Calculated Members
[Open Receivables Pct]
CASE
                                                                          Here are some examples of Calculated
WHEN ISEMPTY ([Measures].[Invoice Amount])
                                                                          Members that are in the cube. They
     THEN null            -- Divide by 0 check
WHEN ([Measures].[Invoice Amount])= 0
                                                                          can be used by Excel Services Pivot
     THEN null            -- Divide by 0 check
                                                                          Tables, Reporting Services, other
ELSE
                                                                          reporting tools, and in MDX queries.
     ([Measures].[Invoice Amount]
         - [Measures].[Amount Received])
                                                                          These Calculated Members, and
      / [Measures].[Invoice Amount]
                                                                          others, were created primarily to
END
                                                                          simplify KPI expressions.
[Jobs Current Quarter]
                                                                          An example of one Calculated Member
([All Works Calendar].[FY Calendar].CurrentMember,
            [Measures].[Job Summary Facts Count])
                                                                          is shown in the BIDS interface screen
[Jobs Previous Quarter]
                                                                          shot below.
([All Works Calendar].[FY Calendar].PrevMember,
            [Measures].[Job Summary Facts Count])
[Total Cost]
        ( [Measures].[Total Overhead]
         + [Measures].[Total Material Cost]
         + [Measures].[Total Labor Cost] )


Screen shot of the Calculated Member Interface in BIDS




© David Tufte 2009                      Business Intelligence Portfolio                                Page 17 of 27
KPI’s, Trend Indicators, and Excel Services - Samples
Example - KPI Open Receivables
       Open Receivables Percent as: (Invoice Amount – Amount Received) / (Amount Received)



                                                                                       This KPI was written
                                                                                       so the different levels
                                                                                       of the KPI Indicators
                                                                                       would be expressed as
                                                                                       multiples of the goal.
                                                                                       This allows a change
                                                                                       to only one place
                                                                                       should the goal/target
                                                                                       change.
                                                                                       This KPI had a few
                                                                                       special considerations
                                                                                       – not every client has
                                                                                       receivables every
                                                                                       month, and a few
                                                                                       clients were invoiced
Trend indicator:      N/A    - Using Trend Indicator to Display a Comment for Users
                                                                                       for more than their
                                                                                       receivables. For those
                                                                                       clients without an
                                                                                       open receivable, no
                                                                                       KPI indicator is
                                                                                       displayed (“Null”).
                                                                                       For those clients that
                                                                                       were invoiced for
                                                                                       more than their
                                                                                       receivables stated, a
                                                                                       message to check on
                                                                                       this is automatically
                                                                                       generated. The Trend
                                                                                       Indicator was used for
                                                                                       this purpose, since the
                                                                                       client did not have a
                                                                                       requirement for a
                                                                                       Trend Indicator.




This is just one example of a KPI. The project documentation defines each of the KPI’s created for the
project. Screen shots of this KPI and others are provided on the following pages.




© David Tufte 2009                       Business Intelligence Portfolio                         Page 18 of 27
KPI’s, Trend Indicators, and Excel Services - Samples
Excel Services was used to connect to the Analysis Services Cubes, and used the Pivot Table Interface to
create reports including KPI’s and Trend Indicators.




Screen Shot: KPI Open Receivables. This report shows clients, their invoice amount, and the amount
received. If the open receivables are greater than 10%, show Red, between 5 and 10% show Yellow, and less
than 5% show Green. There are a few clients that paid more than they were invoiced, so the KPI logic was
extended to indicate a message to have someone verify the amounts. The Comment was automatically
generated by using the Trend Indicator logic. If we received more than the client was invoiced, add the
comment.




Screen Shot: KPI Quarter to Quarter Increase. This KPI only has Red and Green indicators. If there are the
same or more jobs per client this period, then Green (good). If there are less jobs, then Red (bad). If not
jobs recorded for requested and previous quarter, then have no KPI indicator (Null). The Comment is
automatically generated by using the Trend Indicator logic. If fewer jobs, add the comment.



© David Tufte 2009                       Business Intelligence Portfolio                         Page 19 of 27
KPI’s, Trend Indicators, and Excel Services - Samples




Screen Shot: This report shows regional sales and returns, and the percentage of returns vs sales. The KPI
is based on the Returns Percentage; Less than 5% Green, 5-10% Yellow, and greater than 10% Red. The
Trend indicator shows the trend as compared to last year; if a smaller percent of returns, then an Up Arrow
(good). If the percent (rounded) is the same, then show a Right Arrow (OK). If a larger percent of returns
than last year, then indicate a Down Arrow (bad).




© David Tufte 2009                      Business Intelligence Portfolio                        Page 20 of 27
SSRS – Reporting Services
SSRS Report: This is a report that uses Cascading Parameters before running the report. The components
of the report follow.




The Report in Layout Mode (Design)




© David Tufte 2009                     Business Intelligence Portfolio                      Page 21 of 27
SSRS – Reporting Services
Building the Report




Defining the parameters for the report




Data Tab: This report required some custom MDX.




© David Tufte 2009                   Business Intelligence Portfolio   Page 22 of 27
SSRS – Reporting Services
Preview




                                                              The database did not
                                                              have a description for
                                                              the “Total” of all the
                                                              Employees. This IIF
                                                              statement substitutes
                                                              the Description
                                                              “Total” when
                                                              appropriate.

Insert the Total Header                                       Logic was also added
                                                              in the report to check
                                                              if a quarter was
                                                              selected with no
                                                              previous quarter. A
                                                              “No Data” message
                                                              was displayed to let
                                                              the user know that
                                                              no data exists for
                                                              that quarter.




© David Tufte 2009          Business Intelligence Portfolio             Page 23 of 27
MOSS/PPS – Share Point and Performance Point Services
Share Point was used to deploy reports through a Web Page. These reports were created in Report Services
(SSRS) and Excel Services. In addition, Performance Point was used to take some of these same reports and
create dashboards and scorecards. These Performance Point dashboards and scorecards were deployed
through Share Point Services as well. Selected sample screen shots follow.

Job Profitability Chart –Created in Excel




Dashboard for Labor Reporting




© David Tufte 2009                     Business Intelligence Portfolio                       Page 24 of 27
MOSS/PPS – Share Point and Performance Point Services
Scorecards Created in PPS




Labor Analysis Chart and Graph Created in PPS




© David Tufte 2009              Business Intelligence Portfolio   Page 25 of 27
MOSS/PPS – Share Point and Performance Point Services
SSRS Report that is generated every morning – Default Parameters defined




Excel Services Report – filter interface displayed




© David Tufte 2009                Business Intelligence Portfolio          Page 26 of 27
MOSS/PPS – Share Point and Performance Point Services
SSRS Report – Parameter selection




Excel Services Chart deployed through PPS with Parameters




© David Tufte 2009              Business Intelligence Portfolio   Page 27 of 27

More Related Content

What's hot

Dbms narrative question answers
Dbms narrative question answersDbms narrative question answers
Dbms narrative question answers
shakhawat02
 
Data Warehouse and Business Intelligence - Recipe 1
Data Warehouse and Business Intelligence - Recipe 1Data Warehouse and Business Intelligence - Recipe 1
Data Warehouse and Business Intelligence - Recipe 1
Massimo Cenci
 
Agnes's SSIS Project Documentation
Agnes's SSIS Project DocumentationAgnes's SSIS Project Documentation
Agnes's SSIS Project Documentation
agnestetter
 
Bigtable
BigtableBigtable
Bigtable
ptdorf
 
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Massimo Cenci
 
Advanced database
Advanced databaseAdvanced database
Advanced database
nasir1024
 
Sql
SqlSql
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
cadmiell
 
SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)
Yasmin Ashraf
 

What's hot (9)

Dbms narrative question answers
Dbms narrative question answersDbms narrative question answers
Dbms narrative question answers
 
Data Warehouse and Business Intelligence - Recipe 1
Data Warehouse and Business Intelligence - Recipe 1Data Warehouse and Business Intelligence - Recipe 1
Data Warehouse and Business Intelligence - Recipe 1
 
Agnes's SSIS Project Documentation
Agnes's SSIS Project DocumentationAgnes's SSIS Project Documentation
Agnes's SSIS Project Documentation
 
Bigtable
BigtableBigtable
Bigtable
 
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
 
Advanced database
Advanced databaseAdvanced database
Advanced database
 
Sql
SqlSql
Sql
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)
 

Similar to Tufte Sample Bi Portfolio

Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolio
npatel2362
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
eileensauer
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
eileensauer
 
Business Intelligence Dev. Portfolio
Business Intelligence Dev. PortfolioBusiness Intelligence Dev. Portfolio
Business Intelligence Dev. Portfolio
Vincent Gaines
 
B Woodward Portfolio
B Woodward PortfolioB Woodward Portfolio
B Woodward Portfolio
bwoodward
 
Colin\'s BI Portfolio
Colin\'s BI PortfolioColin\'s BI Portfolio
Colin\'s BI Portfolio
colinsobers
 
Project Portfolio
Project PortfolioProject Portfolio
Project Portfolio
Arthur Chan
 
Bi Ppt Portfolio Elmer Donavan
Bi Ppt Portfolio  Elmer DonavanBi Ppt Portfolio  Elmer Donavan
Bi Ppt Portfolio Elmer Donavan
EJDonavan
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfolio
rmatejek
 
Bi Portfolio
Bi PortfolioBi Portfolio
Bi Portfolio
Sandra1217
 
My Business Intelligence Portfolio
My Business Intelligence PortfolioMy Business Intelligence Portfolio
My Business Intelligence Portfolio
lfinkel
 
Chris Tselebis Portfolio
Chris Tselebis PortfolioChris Tselebis Portfolio
Chris Tselebis Portfolio
ctselebis
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
dklawson
 
Ca 10 G1 John Buickerood Portfolio
Ca 10 G1 John Buickerood PortfolioCa 10 G1 John Buickerood Portfolio
Ca 10 G1 John Buickerood Portfolio
John_Buickerood
 
Chris Bull's Bi Portfolio
Chris Bull's Bi PortfolioChris Bull's Bi Portfolio
Chris Bull's Bi Portfolio
z3bull
 
MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra
QUONTRASOLUTIONS
 
Kevin Bengtson Portfolio
Kevin Bengtson PortfolioKevin Bengtson Portfolio
Kevin Bengtson Portfolio
Kbengt521
 
Kevin Fahy Bi Portfolio
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi Portfolio
KevinPFahy
 
CV Chandrajit Samanta
CV Chandrajit SamantaCV Chandrajit Samanta
Portfolio Genet
Portfolio GenetPortfolio Genet
Portfolio Genet
Genet Tadesse
 

Similar to Tufte Sample Bi Portfolio (20)

Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Business Intelligence Dev. Portfolio
Business Intelligence Dev. PortfolioBusiness Intelligence Dev. Portfolio
Business Intelligence Dev. Portfolio
 
B Woodward Portfolio
B Woodward PortfolioB Woodward Portfolio
B Woodward Portfolio
 
Colin\'s BI Portfolio
Colin\'s BI PortfolioColin\'s BI Portfolio
Colin\'s BI Portfolio
 
Project Portfolio
Project PortfolioProject Portfolio
Project Portfolio
 
Bi Ppt Portfolio Elmer Donavan
Bi Ppt Portfolio  Elmer DonavanBi Ppt Portfolio  Elmer Donavan
Bi Ppt Portfolio Elmer Donavan
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfolio
 
Bi Portfolio
Bi PortfolioBi Portfolio
Bi Portfolio
 
My Business Intelligence Portfolio
My Business Intelligence PortfolioMy Business Intelligence Portfolio
My Business Intelligence Portfolio
 
Chris Tselebis Portfolio
Chris Tselebis PortfolioChris Tselebis Portfolio
Chris Tselebis Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Ca 10 G1 John Buickerood Portfolio
Ca 10 G1 John Buickerood PortfolioCa 10 G1 John Buickerood Portfolio
Ca 10 G1 John Buickerood Portfolio
 
Chris Bull's Bi Portfolio
Chris Bull's Bi PortfolioChris Bull's Bi Portfolio
Chris Bull's Bi Portfolio
 
MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra
 
Kevin Bengtson Portfolio
Kevin Bengtson PortfolioKevin Bengtson Portfolio
Kevin Bengtson Portfolio
 
Kevin Fahy Bi Portfolio
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi Portfolio
 
CV Chandrajit Samanta
CV Chandrajit SamantaCV Chandrajit Samanta
CV Chandrajit Samanta
 
Portfolio Genet
Portfolio GenetPortfolio Genet
Portfolio Genet
 

Recently uploaded

[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 

Recently uploaded (20)

[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 

Tufte Sample Bi Portfolio

  • 1. Business Intelligence Portfolio ™ SSIS SSAS BI MOSS/PPS SSRS Name: David Tufte Email: David.Tufte@SetFocus.com Phone: 630.209.9288 1
  • 2. Table of Contents Project Overview ....................................................................................................... 3 T-SQL Samples ......................................................................................................... 4 MDX Samples ........................................................................................................... 7 SSIS – Integration Services ....................................................................................... 7 SSAS – Analysis Services ......................................................................................... 12 MDX Samples ......................................................................................................... 14 Calculated Members ................................................................................................ 17 KPI’s, Trend Indicators, and Excel Services - Samples ............................................... 18 SSRS – Reporting Services ....................................................................................... 21 MOSS/PPS – Share Point and Performance Point Services .......................................... 24 © David Tufte 2009 Business Intelligence Portfolio Page 2 of 27
  • 3. Project Overview Sample Business Intelligence Project Work This portfolio contains selected examples of my development skills in the Microsoft Business Intelligence arena. Core technologies covered:  Microsoft SQL Server 2005 T-SQL  Microsoft SQL Server 2005 MDX  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 (PPS) Introduction: Project Summary Design and build a Business Intelligence solution for a simulated construction company to track employee, customer, job order, and timesheet information. Audience Business executives  Information workers  IT managers  Project Goals Define a Star Schema database using Visio (four fact tables)  Create a Staging Database (Visio created the DDL)  Create an ETL solution to update the SQL Server 2005 database from Excel and flat file sources using  SSIS Create a Star Schema Analysis Services cube with SSAS  Write MDX queries based on specifications  Define Calculated Members and business Key Performance Indicators (KPIs) in SSAS  Use Excel Services 2007 to display the cube data and the KPIs, displaying statuses and trends  Produce detail and summary reports using SSRS  Create score cards using MS Office Performance Point  Implement business intelligence dashboards using MOSS 2007 (SharePoint)  © David Tufte 2009 Business Intelligence Portfolio Page 3 of 27
  • 4. T-SQL Samples /* David Tufte Query to Join Three tables and display Title, Item, and Copy information */ SELECT it.isbn , co.copy_no , co.on_loan , ti.title , it.translation , it.cover FROM title ti INNER JOIN item it ON ti.title_no = it.title_no -- Join first two tables INNER JOIN copy co ON co.isbn = it.isbn -- Join the Third table /* David Tufte Combine columns to create the Full Name */ SELECT m.firstname + ' ' + m.middleinitial + ' ' + m.lastname as Name -- Combine to make Full Name , a.street , a.city , a.state , a.zip FROM member m INNER JOIN adult a ON m.member_no = a.member_no © David Tufte 2009 Business Intelligence Portfolio Page 4 of 27
  • 5. T-SQL Samples /* David Tufte Query to combine columns to create a Full Name And the convert a character number into a Date field */ SELECT m.member_no , m.lastname + ', ' + m.firstname + ' ' + m.middleinitial as Name -- Build the Member Name , r.isbn , convert(CHAR(8), r.log_date, 1) as Date -- Convert number to Date field FROM member m LEFT OUTER JOIN reservation r -- Get member info even if no book currently out ON m.member_no = r.member_no WHERE m.member_no in (250, 341, 1675) -- Can expand list ORDER BY m.member_no /* David Tufte Query to Declare and use Variables in a SQL statement. */ declare @titleString VARCHAR(30) , @titleNum CHAR(15) set @titleString = 'The title is: ' set @titleNum = ', title number ' select @titleString + title + @titleNum + CONVERT(VARCHAR(10), title_no) AS 'Book Title and Number' from title © David Tufte 2009 Business Intelligence Portfolio Page 5 of 27
  • 6. T-SQL Samples /* David Tufte Using the UNION Operator to Combine Result Sets of separate queries */ SELECT a.state ,a.member_no ,count(*) AS numkids FROM juvenile AS j INNER JOIN adult AS a ON j.adult_member_no = a.member_no WHERE a.state = 'AZ' GROUP BY a.member_no,a.state HAVING COUNT(*) > 2 UNION SELECT a.state ,a.member_no ,count(*) AS numkids FROM juvenile AS j INNER JOIN adult AS a ON j.adult_member_no = a.member_no WHERE a.state = 'CA' GROUP BY a.member_no,a.state HAVING COUNT(*) > 3 /* David Tufte Use a Subquery as a Derived Table */ SELECT d.adult_member_no , a.expr_date , d.No_Of_Children FROM adult AS a INNER JOIN ( SELECT adult_member_no , COUNT(*) AS No_Of_Children FROM juvenile GROUP BY adult_member_no HAVING COUNT(*) > 3 ) AS d ON a.member_no = d.adult_member_no © David Tufte 2009 Business Intelligence Portfolio Page 6 of 27
  • 7. SSIS – MDX Samples Integration Services Integration Services Create packages to transfer the data from different raw data sources (Excel, CSV). Data sources are both  normalized and non-normalized. Do a full load of data into MS SQL Server 2005.  Run scheduled packages nightly to import/update any additional information.  Perform validation to detect errors (e.g. child records with invalid parent records).  Generate emails with the results, including rows inserted, updated. Errors are redirected to log files which  become email attachments. Create a separate package to re-index and shrink the database, as well as perform nightly backups of the  database. Screenshots: This particular package required reading multiple CSV files and totaling record counts for all files. Following are the control flow and data flow screenshots. Control flow for a package © David Tufte 2009 Business Intelligence Portfolio Page 7 of 27
  • 8. SSIS – Integration Services Notification. This is an example of the settings to send email alerts when an SSIS package completes, and there are invalid dates in the source data. The email has the error information in the Subject line, in the body, and includes the error file with the bad record. Similar emails are sent when data is successfully inserted as well as when data is updated. Sample email with error information including date and time. © David Tufte 2009 Business Intelligence Portfolio Page 8 of 27
  • 9. SSIS – Integration Services SSIS Package to read data from varying number of flat files in a folder. Running totals of rows inserted, updated, and errors generated for all files are kept for notification after the package completes. Code on next page. Data flow gets repeated for each source file in the source directory. © David Tufte 2009 Business Intelligence Portfolio Page 9 of 27
  • 10. SSIS – Integration Services MSVB Script to track the row counts for successful and unsuccessful data insert or update. ' 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. ' 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() ' ' 'TotalTimeSheetJobMasterPKRowCnt ' ' Dts.Variables(quot;TotalInsertedCurrentTimeSheetRecordRowCntquot;).Value = _ CInt(Dts.Variables(quot;TotalInsertedCurrentTimeSheetRecordRowCntquot;).Value) _ + CInt(Dts.Variables(quot;InsertedCurrentTimeSheetRecordRowCntquot;).Value) Dts.Variables(quot;TotalInvalidClosedJobTimeSheetRowCntquot;).Value = _ CInt(Dts.Variables(quot;TotalInvalidClosedJobTimeSheetRowCntquot;).Value) _ + CInt(Dts.Variables(quot;InvalidClosedJobTimeSheetRowCntquot;).Value) Dts.Variables(quot;TotalInvalidTimeSheetJobMasterPKRowCntquot;).Value = _ CInt(Dts.Variables(quot;TotalInvalidTimeSheetJobMasterPKRowCntquot;).Value) _ + CInt(Dts.Variables(quot;InvalidTimeSheetJobMasterPKRowCntquot;).Value) Dts.Variables(quot;TotalUpdatedTimeSheetRecordRowCntquot;).Value = _ CInt(Dts.Variables(quot;TotalUpdatedTimeSheetRecordRowCntquot;).Value) _ + CInt(Dts.Variables(quot;UpdatedTimeSheetRecordRowCntquot;).Value) Dts.Variables(quot;TotalInvalidEmployeePKRowCntquot;).Value = _ CInt(Dts.Variables(quot;TotalInvalidEmployeePKRowCntquot;).Value) _ + CInt(Dts.Variables(quot;InvalidEmployeePKRowCntquot;).Value) ' Dts.TaskResult = Dts.Results.Success End Sub End Class © David Tufte 2009 Business Intelligence Portfolio Page 10 of 27
  • 11. SSIS – Integration Services Master Package: This is the master control flow of all the SSIS packages for loading the Staging Database for the AllWorks Data Source View. Several tasks can be done in parallel, while others are dependent on previous tasks being completed. After the database is completely loaded, some maintenance tasks are executed – the database is re-indexed, backed-up, and compressed. All packages were moved to the server when they were production ready, and a SQL Server Agent was set up to run this Master Package nightly at 12:01 a.m. © David Tufte 2009 Business Intelligence Portfolio Page 11 of 27
  • 12. SSAS – Analysis Services Design the Data Source View using BIDS  Restore the All Works Database from the Backup file.  Create the four fact tables from the scripts provided by the DBA.  Create the calendar table (AllWorksCalendar) from the script provided by the DBA.  Establish database connection.  Use “Service Account” for login credentials.  Select the tables that we will use, including the fact tables and the dimension tables.  All tables are indicated in the screen shot that follows.  The DSV relationships are not completely established, and must be defined manually. Utilize the Data Source View (DSV) Diagram for All Works Data Source, define the primary key foreign key related members between tables, and save. Here is the DSV Diagram: All Works DSV (Data Source View) © David Tufte 2009 Business Intelligence Portfolio Page 12 of 27
  • 13. SSAS – Analysis Services Design the Cube using BIDS Utilize the Cube Wizard to build the All Works Cube  Automatically create attributes and hierarchies  Verify that the Fact tables and Dimension Tables properly identified  Verify measures by measure group  Verify dimensions  Name cube and finish  Use dimension Usage to verify dimensions used in each fact table  Edit AllWorksCalendar dimension – rename levels and create hierarchy  Here is the Cube Design and Dimension Editor: © David Tufte 2009 Business Intelligence Portfolio Page 13 of 27
  • 14. MDX Samples /* David Tufte Job Labor Query 04-05 Show All employees for 2005 Q4 (This Period), and four periods ago (Prior Period), for total hours worked in the Quarter Headers are formatted with This Period and Prior Period Titles This would be addressed through Report Services Format for measures was done in the Cube Designer, Format_String Property */ WITH MEMBER [Hours This Period] AS ([All Works Calendar].[FY Calendar].CurrentMember, [Measures].[Hoursworked]) MEMBER [Hours 4 Periods Prior] AS ([All Works Calendar].[FY Calendar].CurrentMember.Lag(4), [Measures].[Hoursworked]) MEMBER [Pct Change] as CASE WHEN ISEMPTY ([Hours 4 Periods Prior]) AND ISEMPTY ([Hours This Period]) THEN NULL -- If both periods empty, return NULL to drop empty rows WHEN ISEMPTY ([Hours 4 Periods Prior]) THEN 'No Prior Period' -- Indicate Prior values empty WHEN ISEMPTY ([Hours This Period]) THEN 'No Current Period' -- Indicate Current values empty ELSE ([Hours This Period] - [Hours 4 Periods Prior])/[Hours This Period] END , format_string = 'Percent' Select { [Hours This Period], [Hours 4 Periods Prior], [Pct Change]} This query compares the on columns, hours by employee for a NON EMPTY specific Year/Quarter, [Employees].[Full Name].Children on rows with the hours from 4 From [All Works Cube] quarters previous. Where [All Works Calendar].[FY Calendar].[Year].[2005].[2005 Q4] The headings are generic, since this query would check 4 previous time periods, for whatever time hierarchy was requested; years, weeks, months, etc. Error checking was done to prevent divide by zero, and to provide some additional information. © David Tufte 2009 Business Intelligence Portfolio Page 14 of 27
  • 15. MDX Samples /* David Tufte Job Labor Query 04-04 For 2005, show the job and the top three employees who worked the most hours, and their Total Labor dollar amount. Show the jobs in job order, and within the job show the employees in hours worked order. Format for measures was done in the Cube Designer, Format_String Property */ WITH SET [JobSet] AS -- Set of Jobs ([Job Master].[Description].[All].Children , [Measures].[Hoursworked]) SET [MainSet] AS generate -- For Job, find the Top 3 Employees ( [JobSet] , ( [Job Master].[Description].CurrentMember , Topcount ([Employees].[Full Name].Children, 3, [Measures].[Hoursworked]) ) ) This query determines for Select each job, the three { employees that worked the [Measures].[Hoursworked] most hours on that job, ,[Measures].[Total Labor] } and indicates the total on columns, labor dollar amount for that Non Empty employee on that job. [MainSet] on rows First a list {JobSet} of jobs From [All Works Cube] from the year 2005 was Where [All Works Calendar].[FY Calendar].[Year].[2005] created, then for each job in that list the top three employees based on hours worked was selected {MainSet}. This nested list is on the rows, and the measures are on the columns. Simply change the time period in the where clause to get this information for a different time period. © David Tufte 2009 Business Intelligence Portfolio Page 15 of 27
  • 16. MDX Samples /* David Tufte Job Summary Query 01-11 Find Total Labor Cost, Material Cost, and Labor plus Material Cost. Retrieve all Clients with a Total Labor cost to date greater than 5,000, and the word 'INC' appears in the client name Format for measures was done in the Cube Designer, Format_String Property */ WITH set [Filtered Set] as Filter ( [Clients].[Client Name].Members , ([Inc Names] AND [Large Labor Cost]) ) member [Inc Names] as -- Only names that include quot;INCquot; in them (instr([Clients].[Client Name].CurrentMember.Name, quot;INCquot; ) > 0) member [Large Labor Cost] as -- Select Labor Costs over $5,000 ([Measures].[Total Labor Cost] > 5000) member [Measures].[Labor Plus Material] as This query creates two ([Measures].[Total Labor Cost] lists using the Filter + [Measures].[Total Material Cost]) statement; the customers Select that are incorporated {[Measures].[Total Labor Cost] (“INC” in their name), and ,[Measures].[Total Material Cost] ,[Measures].[Labor Plus Material] the customers that have } been invoiced for Total on columns, Labor Costs more than Non Empty {[Filtered Set]} $5000. on rows These two lists are From [All Works Cube] combined {Filtered Set} and only those customers that satisfy both sets of criteria are included in the report. © David Tufte 2009 Business Intelligence Portfolio Page 16 of 27
  • 17. Calculated Members [Open Receivables Pct] CASE Here are some examples of Calculated WHEN ISEMPTY ([Measures].[Invoice Amount]) Members that are in the cube. They THEN null -- Divide by 0 check WHEN ([Measures].[Invoice Amount])= 0 can be used by Excel Services Pivot THEN null -- Divide by 0 check Tables, Reporting Services, other ELSE reporting tools, and in MDX queries. ([Measures].[Invoice Amount] - [Measures].[Amount Received]) These Calculated Members, and / [Measures].[Invoice Amount] others, were created primarily to END simplify KPI expressions. [Jobs Current Quarter] An example of one Calculated Member ([All Works Calendar].[FY Calendar].CurrentMember, [Measures].[Job Summary Facts Count]) is shown in the BIDS interface screen [Jobs Previous Quarter] shot below. ([All Works Calendar].[FY Calendar].PrevMember, [Measures].[Job Summary Facts Count]) [Total Cost] ( [Measures].[Total Overhead] + [Measures].[Total Material Cost] + [Measures].[Total Labor Cost] ) Screen shot of the Calculated Member Interface in BIDS © David Tufte 2009 Business Intelligence Portfolio Page 17 of 27
  • 18. KPI’s, Trend Indicators, and Excel Services - Samples Example - KPI Open Receivables Open Receivables Percent as: (Invoice Amount – Amount Received) / (Amount Received) This KPI was written so the different levels of the KPI Indicators would be expressed as multiples of the goal. This allows a change to only one place should the goal/target change. This KPI had a few special considerations – not every client has receivables every month, and a few clients were invoiced Trend indicator: N/A - Using Trend Indicator to Display a Comment for Users for more than their receivables. For those clients without an open receivable, no KPI indicator is displayed (“Null”). For those clients that were invoiced for more than their receivables stated, a message to check on this is automatically generated. The Trend Indicator was used for this purpose, since the client did not have a requirement for a Trend Indicator. This is just one example of a KPI. The project documentation defines each of the KPI’s created for the project. Screen shots of this KPI and others are provided on the following pages. © David Tufte 2009 Business Intelligence Portfolio Page 18 of 27
  • 19. KPI’s, Trend Indicators, and Excel Services - Samples Excel Services was used to connect to the Analysis Services Cubes, and used the Pivot Table Interface to create reports including KPI’s and Trend Indicators. Screen Shot: KPI Open Receivables. This report shows clients, their invoice amount, and the amount received. If the open receivables are greater than 10%, show Red, between 5 and 10% show Yellow, and less than 5% show Green. There are a few clients that paid more than they were invoiced, so the KPI logic was extended to indicate a message to have someone verify the amounts. The Comment was automatically generated by using the Trend Indicator logic. If we received more than the client was invoiced, add the comment. Screen Shot: KPI Quarter to Quarter Increase. This KPI only has Red and Green indicators. If there are the same or more jobs per client this period, then Green (good). If there are less jobs, then Red (bad). If not jobs recorded for requested and previous quarter, then have no KPI indicator (Null). The Comment is automatically generated by using the Trend Indicator logic. If fewer jobs, add the comment. © David Tufte 2009 Business Intelligence Portfolio Page 19 of 27
  • 20. KPI’s, Trend Indicators, and Excel Services - Samples Screen Shot: This report shows regional sales and returns, and the percentage of returns vs sales. The KPI is based on the Returns Percentage; Less than 5% Green, 5-10% Yellow, and greater than 10% Red. The Trend indicator shows the trend as compared to last year; if a smaller percent of returns, then an Up Arrow (good). If the percent (rounded) is the same, then show a Right Arrow (OK). If a larger percent of returns than last year, then indicate a Down Arrow (bad). © David Tufte 2009 Business Intelligence Portfolio Page 20 of 27
  • 21. SSRS – Reporting Services SSRS Report: This is a report that uses Cascading Parameters before running the report. The components of the report follow. The Report in Layout Mode (Design) © David Tufte 2009 Business Intelligence Portfolio Page 21 of 27
  • 22. SSRS – Reporting Services Building the Report Defining the parameters for the report Data Tab: This report required some custom MDX. © David Tufte 2009 Business Intelligence Portfolio Page 22 of 27
  • 23. SSRS – Reporting Services Preview The database did not have a description for the “Total” of all the Employees. This IIF statement substitutes the Description “Total” when appropriate. Insert the Total Header Logic was also added in the report to check if a quarter was selected with no previous quarter. A “No Data” message was displayed to let the user know that no data exists for that quarter. © David Tufte 2009 Business Intelligence Portfolio Page 23 of 27
  • 24. MOSS/PPS – Share Point and Performance Point Services Share Point was used to deploy reports through a Web Page. These reports were created in Report Services (SSRS) and Excel Services. In addition, Performance Point was used to take some of these same reports and create dashboards and scorecards. These Performance Point dashboards and scorecards were deployed through Share Point Services as well. Selected sample screen shots follow. Job Profitability Chart –Created in Excel Dashboard for Labor Reporting © David Tufte 2009 Business Intelligence Portfolio Page 24 of 27
  • 25. MOSS/PPS – Share Point and Performance Point Services Scorecards Created in PPS Labor Analysis Chart and Graph Created in PPS © David Tufte 2009 Business Intelligence Portfolio Page 25 of 27
  • 26. MOSS/PPS – Share Point and Performance Point Services SSRS Report that is generated every morning – Default Parameters defined Excel Services Report – filter interface displayed © David Tufte 2009 Business Intelligence Portfolio Page 26 of 27
  • 27. MOSS/PPS – Share Point and Performance Point Services SSRS Report – Parameter selection Excel Services Chart deployed through PPS with Parameters © David Tufte 2009 Business Intelligence Portfolio Page 27 of 27