3. From the SQL Server database, build several custom views into the database, and set up a series of cubes, dimensions and key point indicators (KPIs) to analyze and measure AllWorks profitability and costs.
9. MDX Queries -- Show Overhead by Overhead Category for Q3 and Q4 2005 WITH MEMBER [2004 Q4] AS ( [All Works Calendar].[Fy Qtr].[2004 Q4] ,[Measures].[Weekly Over Head] ) ,Format_String = "Currency" MEMBER [2005 Q4] AS ( [All Works Calendar].[Fy Qtr].[2005 Q4] ,[Measures].[Weekly Over Head]) ,Format_String = "Currency" SELECT { [2004 Q4] ,[2005 Q4] } ON 0 ,[Overhead].[Description].MEMBERS ON 1 FROM [All Works];
10. MDXQueries -- Show jobs in order of purchase amount and then show the -- breakdown in each job of material type (for instance, -- Job A, total purchase amount, amount for fuel, amount for materials, -- amount for petty cash, etc.) WITH MEMBER [Material Purchases] AS [Measures].[Purchase Amount] ,Format_String = "Currency" SELECT [Material Purchases] ON 0 ,NON EMPTY Order ([Job Master].[Description].Children ,[Material Purchases] ,bdesc) * [Material Types].[Description].MEMBERS ON 1 FROM [All Works];
11. MDX Queries -- 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 Generate ([Job Master].[Description].Children ,TopCount ([Job Master].[Description].CurrentMember * [Employees].[Full Name].Children ,3 ,[Measures].[Hoursworked] )) ON ROWS FROM [All Works] WHERE [All Works Calendar].[2005];
12. -- Show All employees for 2005 Q4, and four periods ago, for total hours worked in the Quarter WITH MEMBER [All Works Calendar].[Fy Qtr].[2005 Q4] AS [All Works Calendar].[Fy Year - Fy Qtr].[Fy Qtr].&[2005 Q4] MEMBER [All Works Calendar].[Fy Qtr].[2004 Q4] AS ParallelPeriod ( [All Works Calendar].[Fy Year - Fy Qtr].[Fy Qtr] ,4 ,[All Works Calendar].[Fy Year - Fy Qtr].[Fy Qtr].&[2005 Q4] ) SELECT { [2004 Q4] ,[2005 Q4] } ON 0 ,[Employees].[Full Name].Children ON 1 FROM [All Works] WHERE [Measures].[Hoursworked]; MDX Queries