2. Table of Contents This portfolio contains examples that were developed while participating in the SetFocus Microsoft Business Intelligence Masters Program.
7. This query returns all publishers with books that are currently out of stock,quantities still needed, and order status, ordered by greatest quantity needed first SELECT books.ISBN, title as [Book Title], PUBLISHER, QUANTITYORDERED-QUANTITYDISPATCHED AS [Quantity Needed], orders.orderid, case when orderdate+3 < getdate() and quantityordered>quantitydispatched then 'Needs Review' else 'Standard Delay' end AS [STATUS] FROM BOOKS inner join ORDERITEMS on books.isbn=orderitems.isbn inner join orders on orderitems.orderid=orders.orderid WHERE QUANTITYORDERED>QUANTITYDISPATCHED and stock=0 group by books.ISBN, title, PUBLISHER, orderdate, orders.orderid, quantityordered, quantitydispatched order by [quantity needed] desc
8. This query determines the list of countries from which orders have been placed, the number of orders and order items that have been had from each country, the percentages of the total orders, and the percentages of total order items received from each country --Create temporary table select [Country], count(OrderNum) as [Total Orders], sum(QuantityOrdered) as [Total Items Ordered] into #C_Totals from (select right(address, charindex(' ',reverse(address))-1) as 'Country', customers.customerID , orders.orderID as 'OrderNum', orderItems.orderItemID , case when QuantityOrdered is null then 0 else QuantityOrdered end as QuantityOrdered from orders inner join orderItems on orders.orderID=orderItems.orderID right join customers on orders.customerID=customers.customerID group by QuantityOrdered, customers.customerID, address, orders.orderID, orderItems.OrderItemID ) as C_Orders group by [Country] with rollup --Query temporary table to extract, calculate and format data appropriately select [Country], [Total Orders], [Total Items Ordered], (convert(numeric(10,4),([Total Orders]/(select convert(numeric,[Total Orders]) from #C_Totals where [Country] is null)))*100) as [% of Total Orders] , (convert(numeric(10,4),([Total Items Ordered]/(select convert(numeric,[Total Items Ordered]) from #C_Totals where [Country] is null)))*100) as [% of Total Items Ordered] from #C_Totals where [Country] is not null group by [Country], [Total Orders], [Total Items Ordered] -- Should clean up afterwards drop table #C_Totals
10. This is the data flow and control flow for the Job Time Sheets package. This package imports multiple csv files doing checks to insure data integrity and writing rows that fail to an error log file for review.
11. This is the script that tracks how many records were processed for the Job Time Sheets package. It breaks them up into Inserted, Updated and Error categories. These totals are used in the email that is sent when processing is completed. ' Microsoft SQL Server Integration Services Script Task ' Write scripts using Microsoft Visual Basic ' The ScriptMain class is the entry point of the Script Task. Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Runtime Public Class ScriptMain Public Sub Main() Dim InsertedRows As Integer = CInt(Dts.Variables("InsertedRows").Value) Dim ErrorRows As Integer = CInt(Dts.Variables("ErrorRows").Value) Dim RawDataRows As Integer = CInt(Dts.Variables("RawDataRows").Value) Dim UpdatedRows As Integer = CInt(Dts.Variables("UpdatedRows").Value) Dim InsertedRows_fel As Integer = CInt(Dts.Variables("InsertedRows_fel").Value) Dim ErrorRows_fel As Integer = CInt(Dts.Variables("ErrorRows_fel").Value) Dim RawDataRows_fel As Integer = CInt(Dts.Variables("RawDataRows_fel").Value) Dim UpdatedRows_fel As Integer = CInt(Dts.Variables("UpdatedRows_fel").Value) Dts.Variables("InsertedRows").Value = InsertedRows + InsertedRows_fel Dts.Variables("ErrorRows").Value = ErrorRows + ErrorRows_fel Dts.Variables("RawDataRows").Value = RawDataRows + RawDataRows_fel Dts.Variables("UpdatedRows").Value = UpdatedRows + UpdatedRows_fel Dts.TaskResult = Dts.Results.Success End Sub End Class
12. This is the data flow of a package the merged data from multiple tables together in order to create a fact table for a cube.
17. Creating Key Performance Indicators (KPIs) to show visually goals, trends and changes in tracked metrics
18. Use of a KPI in Excel to show Profits against projected goals.
19. Partitioning the cube to separate archival data from more frequently accessed data. Also Aggregations were setup here to further enhance storage and query performance.
21. For 2005, show the job and the top three employees who worked the most hours. Show the jobs in job order, and within the job show the employees in hours worked order SELECT [Measures].[Hoursworked] ON COLUMNS, non empty Order(Generate([Job Master].[Description].[Description].members, ([Job Master].[Description].currentmember, TOPCOUNT([Employees].[Full Name].[Full Name].members, 3,[Measures].[Hoursworked]))), [Measures].[Hoursworked],DESC) on rows FROM Allworks WHERE[All Works Calendar].[Fy Year].&[2005]
22. Show Overhead by Overhead Category for currently selected quarter and the previous quarter, and also show the % of change between the two. WITH MEMBER [Measures].[Previous Qtr] AS ([Measures].[Weekly Over Head], ParallelPeriod ([All Works Calendar].[Fy Year - Fy Qtr].level ,1,[All Works Calendar].[Fy Year - Fy Qtr].currentmember) ) ,FORMAT_STRING = '$#,##0.00;;;0‘ MEMBER [Measures].[Current Qtr] AS ([Measures].[Weekly Over Head], [All Works Calendar].[Fy Year - Fy Qtr].currentmember) ,FORMAT_STRING = '$#,##0.00;;;0‘ MEMBER [Measures].[% Change] AS iif([Measures].[Previous Qtr], (([Measures].[Current Qtr] - [Measures].[Previous Qtr]) / [Measures].[Previous Qtr]),NULL), FORMAT_STRING = '0.00%;;;‘ SELECT {[Measures].[Current Qtr], [Measures].[Previous Qtr], [Measures].[% Change]} on columns, non empty [Overhead].[Description].members on rows FROM Allworks WHERE [All Works Calendar].[Fy Year - Fy Qtr].[2005].lastchild
23. List Hours Worked and Total Labor for each employee for 2005, along with the labor rate (Total labor / Hours worked). Sort the employees by labor rate descending, to see the employees with the highest labor rate at the top. WITH MEMBER [Measures].[Labor Rate] AS [Measures].[Total Labor]/[Measures].[Hoursworked], FORMAT_STRING = 'Currency' SELECT {[Measures].[Hoursworked],[Measures].[Total Labor], [Measures].[Labor Rate]} ON COLUMNS, non empty Order([Employees].[Full Name].members, [Measures].[Labor Rate], BDESC) on rows FROM Allworks WHERE[All Works Calendar].[Fy Year].&[2005]
25. This report show an employees labor cost by weekending date with a grand total at the bottom. Cascading parameters are used to select the employee and dates.
26. A report of region sales percentage by category for a selected year.
28. A breakdown of the labor cost of an employee by quarter. The line graph shows the percentage of labor of the employee for the quarter. The chart at the bottom shows the breakdown by job.
29. The custom MDX code that allows the previous report to run
30. This scorecard has a drill down capability that will allow you to see regions, states and city Sales goals. In addition it is hot linked to a report that shows Dollar Sales.
32. This excel spreadsheet has taken data from a cube and created a chart. This chart and its parameter will then be published using Excel Services to make it available on a Sharepoint server.
33. Another chart built using Excel with data from a cube. This chart allows the tracking of sales data by Category on a selected year. In addition it tracks the selected category percentage of sales vs. the parent on a separate axis. This chart with its parameters was published to SharePoint Server using Excel Services.
35. SharePoint site created with document folders to hold Excel spreadsheets published with Excel Services, SSRS reports, and Performance Point Dashboards. Two web parts are on the front page showing a Excel chart and SSAS KPI published through Performance Point.
36. The previously shown Employee Labor Analysis Report deployed to SharePoiont as part of A Performance Point Dashboard.
37. An SSRS reported scheduled to be autogenerated using SharePoint scheduling and subsription services