SlideShare une entreprise Scribd logo
1  sur  44
Carmen Faber MBA, OCP Wharton, NJ carmenfaber@gmail.com Business Intelligence  Suite Developer 1 Is Business Intelligence in Your Business?
Portfolio Overview This portfolio contains selected examples  of my development skills using  Microsoft Business Intelligence  SSAS  and Sample MDX using BIDS SSAS using Microsoft Visual Studio  page 3-20 MDX – Multi-Dimensional Queries	 Cube Structure				    Various sample Queries - page 21-43  Data Source View			 Dimension Usage Job Master Dimension Structure / Hierarchy   			 Sample SSAS Calculation Calculation  – Open Receivable Percent of Inventory Calculation  – Total Cost Calculation  - Overhead Percent of Total Cost Calculation  - Total Profit Calculation  - Profit Percent Calculation  - Job Increase Calculation  - Overhead Percent Increase Sample SSAS KPIs KPI Open Receivable KPI Job Increase KPI Profit Percent KPI Overhead Percent Increase KPI Profit Percent Partitions Perspective Test using Browser 2 Is Business Intelligence in Your Business?
SSAS Project All Works Cube (Measures/Fact and Dimension) 3 Is Business Intelligence in Your Business?
SSAS Project Data Source View 4 Is Business Intelligence in Your Business?
SSAS Project Dimension Usage 5 Is Business Intelligence in Your Business?
SSAS Project – Job Master Dimension Structure / Hierarchy 6 Is Business Intelligence in Your Business?
SSAS Project – Calculation – Open Receivable Percent of Inventory CASE    WHEN [Measures].[Invoice Amount] = 0        THEN -1.    ELSE ([Measures].[Invoice Amount]-[Measures].[Amount Received])/[Measures].[Invoice Amount] END 7 Is Business Intelligence in Your Business?
SSAS Project – Calculation – Total Cost [Measures].[Total Overhead] + [Measures].[Total Material Cost]+ [Measures].[Total Labor Cost] 8 Is Business Intelligence in Your Business?
SSAS Project – Overhead Percent of Total Cost CASE    WHEN [Measures].[Total Overhead] / [Measures].[TotalCost] = 0        THEN 0    ELSE [Measures].[Total Overhead] / [Measures].[TotalCost] END 9 Is Business Intelligence in Your Business?
SSAS Project – Total Profit [Measures].[Total Labor Profit] + [Measures].[Total Material Profit] +[Measures].[Additional Labor Profit] 10 Is Business Intelligence in Your Business?
SSAS Project – Profit Percent CASE    WHEN [Measures].[TotalCost] = 0        THEN '100%'    ELSE [Measures].[TotalProfit] / ([Measures].[TotalCost] +[Measures].[TotalProfit]) END 11 Is Business Intelligence in Your Business?
SSAS Project – Job Increase [Measures].[Job Summary Facts Count] - ([Measures].[Job Summary Facts Count] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) 12 Is Business Intelligence in Your Business?
SSAS Project – Overhead Percent Increase CASE    WHEN ([Measures].[Weekly Over Head] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) = 0    THEN 1    ELSE ([Measures].[Weekly Over Head] - ([Measures].[Weekly Over Hea d] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1))) /([Measures].[Weekly Over Head] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) END 13 Is Business Intelligence in Your Business?
SSAS Project – KPI Open Receivable CASE      WHEN KPIVALUE("KPIOpenReceivable") <= KPIGOAL( "KPIOpenReceivable")   THEN 1      WHEN KPIVALUE("KPIOpenReceivable")>= KPIGOAL( "KPIOpenReceivable")        AND  KPIVALUE("KPIOpenReceivable")<= KPIGOAL( "KPIOpenReceivable") * 2 THEN 0     WHEN KPIVALUE("KPIOpenReceivable")> KPIGOAL( "KPIOpenReceivable")* 2   THEN -1 END 14 Is Business Intelligence in Your Business?
SSAS Project – KPI Job Increase CASE      WHEN KPIVALUE("KPIJobIncrease") >= KPIGOAL( "KPIJobIncrease")  THEN 1      WHEN KPIVALUE("KPIJobIncrease") < KPIGOAL( "KPIJobIncrease")   THEN -1 END 15 Is Business Intelligence in Your Business?
SSAS Project – KPI Profit Percent CASE       WHEN KPIVALUE("KPIProfitPercent") >          KPIGOAL( "KPIProfitPercent")    THEN 1       WHEN KPIVALUE("KPIProfitPercent") >=             (KPIGOAL( "KPIProfitPercent")/3)       AND  KPIVALUE("KPIProfitPercent") <=             KPIGOAL( "KPIProfitPercent")  THEN 0       WHEN KPIVALUE("KPIProfitPercent") <             (KPIGOAL( "KPIProfitPercent")/ 3) THEN -1 END 16 Is Business Intelligence in Your Business?
SSAS Project – KPI Overhead Percent Increase CASE       WHEN KPIVALUE("KPIOverheadPercentIncrease") <=           KPIGOAL( "KPIOverheadPercentIncrease")    THEN 1       WHEN KPIVALUE("KPIOverheadPercentIncrease") >=             KPIGOAL( "KPIOverheadPercentIncrease")          AND  KPIVALUE("KPIOverheadPercentIncrease") <=             KPIGOAL( "KPIOverheadPercentIncrease")  * 1.5 THEN 0       WHEN KPIVALUE("KPIOverheadPercentIncrease") >             KPIGOAL( "KPIOverheadPercentIncrease")   * 1.5 THEN -1 END 17 Is Business Intelligence in Your Business?
SSAS Project – Partitions 18 Is Business Intelligence in Your Business?
SSAS Project – Perspective 19 Is Business Intelligence in Your Business?
SSAS Project – Test using Browser 20 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries List Hours Worked and Total Labor for each employee for 2005,  -- along with the labor rate (Total labor / Hours worked).  WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY( [Employees].[Full Name].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 21 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve total labor costs by County  SELECT [Measures].[Total Labor Cost]ON COLUMNS,  non empty([Job Master].[County Name].members) ON ROWS FROM [All WorksCube] 22 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve total labor costs by Division  SELECT [Measures].[Total Labor Cost]ON COLUMNS,  non empty([Job Master].[Division Name].members) ON ROWS FROM [All WorksCube] 23 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve total labor costs by Client Account grouping SELECT [Measures].[Total Labor Cost]ON COLUMNS,  non empty([Job Master].[Client Groupings].members) ON ROWS FROM [All WorksCube] 24 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve 3 meatures…total labor cost, total material cost, and total overhead by client  SELECT {[Total Labor Cost], [Total Material Cost], [Total Overhead]}ON COLUMNS,  non empty([Job Master].[Client Name].MEMBERS)  ON ROWS FROM [All WorksCube] 25 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve 3 meatures…total labor cost, total material cost, and total overhead by client  Do the same (retrieve 3 measures) and add a 4th measure, --  a calculated measure, that adds all three costs  WITH MEMBER [AllCosts] AS  [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] SELECT {[Total Labor Cost], [Total Material Cost],  [Total Overhead], [AllCosts]}ON COLUMNS,  non empty([Job Master].[Client Name].MEMBERS)  ON ROWS FROM [All WorksCube] 26 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve and calculate the total costs, the total profit, and total profit %, for each individual job.  The three are calculated as follows: --   	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 WITH MEMBER [TotalCosts] AS  [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] MEMBER [TotalProfit] AS  [Total Labor Profit]+ [Total Material Profit]+ [Additional Labor Profit] MEMBER [ProfitPct] AS   ([TotalProfit] / ([TotalCosts]+[TotalProfit]) ) , format_string = 'percent‘ SELECT {[TotalCosts], [TotalProfit], [ProfitPct] }ON COLUMNS,  NON EMPTY ([Job Master].[Description].members) HAVING [ProfitPct] > 0 ON ROWS FROM [All WorksCube] 27 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve and calculate the total costs, the total profit, and total profit %, for each individual job.  The three are calculated as follows: --   	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 Do the same thing as above, but group it by client  WITH MEMBER [TotalCosts] AS  [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] MEMBER [TotalProfit] AS  [Total Labor Profit]+ [Total Material Profit]+ [Additional Labor Profit] MEMBER [ProfitPct] AS   ([TotalProfit] / ([TotalCosts]+[TotalProfit]) ) , format_string = 'percent' SELECT {[TotalCosts], [TotalProfit], [ProfitPct] }ON COLUMNS,  NON EMPTY ([Job Master].[Client Name].members) ON ROWS FROM [All WorksCube] 28 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Display a count of Jobs by Client in alphabetical order. Display NULLs as 0. WITH MEMBER [JobSummaryFactsCount] as      IIF ([MEASURES].[Job Summary Facts Count] > 0,   [MEASURES].[Job Summary Facts Count], 0) SELECT [JobSummaryFactsCount] ON COLUMNS,   [Job Master].[Client Name].MEMBERS ON ROWS FROM [All WorksCube] 29 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Retrieve all Clients with a Total Labor cost to date greater than 5,000,  and  the word 'INC'  appears in the client name  SELECT [Total Labor Cost]ON COLUMNS,   filter([Job Master].[Client Name].CHILDREN,  Instr([Job Master].[Client Name].CurrentMember.Name, "INC") AND   [Total Labor Cost]> 5000 )   ON ROWS FROM [All WorksCube] 30 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries List the jobs that make up the top 30% of total invoice amount  Select [Measures].[Invoice Amount] on columns, TopPercent([Job Master].[Job Master].children,                                       30,[Measures].[Invoice Amount]) on Rows from[All WorksCube] 31 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show Overhead by Overhead Category for Q3 and Q4 2005 (hint, use the FY Qtr as a dimension)  SELECT {[Fy Qtr].[2005 Q3], [Fy Qtr].&[2005 Q4]} ON COLUMNS, non empty ([Overhead].[Overhead].MEMBERS) ON ROWS FROM [All WorksCube] WHERE [Weekly Over Head] 32 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show Overhead by Overhead Category for Q3 and Q4 2005, and also show the % of change between the two)  WITH member [ovheadCurrentPeriod]    as ([Measures].[Weekly Over Head],  [Fy Qtr].currentmember)   member [ovheadPriorPeriod]    as ([Measures].[Weekly Over Head],  [Fy Qtr].prevmember)   member [PctofCHG] AS  iif([ovheadPriorPeriod],  ([ovheadCurrentPeriod] - [ovheadPriorPeriod])/ [ovheadPriorPeriod],   null), format_string = '0.00%;;;/A'  SELECT {[ovheadCurrentPeriod], [ovheadPriorPeriod], [PctofCHG]  }  ON COLUMNS, non empty([Overhead].[Description].MEMBERS) ON ROWS FROM [All WorksCube] WHERE [Fy Qtr].[2005 Q4] 33 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show Overhead  by Overhead Category for all of 2005, order by Overhead $$ amount descending  WITH SET [OrderOverhead] AS ORDER([Overhead].[Overhead].MEMBERS, [Weekly Over Head], DESC) SELECT [Weekly Over Head] ON COLUMNS, non empty ( [OrderOverhead])  ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 34 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show Material Purchase amounts by Material Type for 2005.  The result set should have 1 column for the purchase amounts for Fuel, Materials, and petty Cash  SELECT [Purchase Amount] ON COLUMNS, [Material Types].[Description].members ON ROWS FROM [All WorksCube] 35 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show Material purchase amounts for 2005, broken out by Material Purchase type and client. (for instance, Fuel for client A, B, C…Petty Cash for client A, B, C, etc.)  Display NULLs as $0.00 WITH MEMBER [PurchaseAmt] as      IIF ([MEASURES].[Purchase Amount] > 0, [Purchase Amount], 0), format_string = 'currency' SELECT [PurchaseAmt] ON COLUMNS, ([Material Types].[Description].children, [Client Name].children) ON ROWS FROM [All WorksCube] WHERE  [Fy Year].[2005] 36 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show a list of total client material purchases for 2005,  in descending purchase amount order.  The result set should show at the top which client required the most materials.  WITH SET [OrderClientPurchAmt] AS order( [Client Name].children, [Purchase Amount], desc) SELECT [Purchase Amount] ON COLUMNS, non empty ( [OrderClientPurchAmt] ) ON ROWS FROM [All WorksCube] WHERE  [Fy Year].[2005] 37 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries -- 	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.)   The general order should be by  -- total purchase amount, so that the top of the result set  -- shows the jobs that required the highest purchase amounts  WITH SET [OrderedJOB] AS     ORDER( [Job Master].[Job Master].CHILDREN, [Purchase Amount], desc)  MEMBER [PurchaseAmt] AS IIF ([Purchase Amount]> 0, [Purchase Amount], 0), format_string = 'currency' SELECT [PurchaseAmt] ON COLUMNS, ([OrderedJOB], [Material Types].[Description].members) ON ROWS FROM [All WorksCube] 38 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries List Hours Worked and Total Labor for each employee for 2005,   along with the labor rate (Total labor / Hours worked).  WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY( [Employees].[Full Name].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005]  39 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries 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[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY(  ORDER ([Employees].[Full Name].members, [LaborRate], bDESC) ) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 40 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries For 2005, show Total Hours worked, total labor dollars, and total labor rate for contractors (employee flag is false) and employees (employee flag is true)    WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS,  non empty ([Employees].[Employee Flag].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 41 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional 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  WITH SET [JobTop3emp] AS     GENERATE( [Job Master].[Description].children , ([Job Master].[Description].currentmember, topcount(  [Employees].[Employees].children, 3, [Hoursworked])  )               ) SELECT [Hoursworked] ON COLUMNS, non empty (  [JobTop3emp] ) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 42 Is Business Intelligence in Your Business?
MDX – Multi-Dimensional Queries Show All employees for 2005 Q4, and four periods ago,  --  for total hours worked in the Quarter   --  Display NULLs as 0 with member [HrsWrkParamWhereCLausewhichisQ42005]  as IIF (      ([Fy Qtr].currentmember,[Measures].[Hoursworked]  ) > 0,      ([Fy Qtr].currentmember,[Measures].[Hoursworked]  ), 0) member [HrsWrk4PeriodsAgo]     as  IIF (       ([Measures].[Hoursworked] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 4)) > 0,        ([Measures].[Hoursworked] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 4)), 0) SELECT { [HrsWrk4PeriodsAgo] , [HrsWrkParamWhereCLausewhichisQ42005]}  ON COLUMNS, [Employees].[Full Name].children  ON ROWS FROM [All WorksCube] WHERE [Fy Qtr].[2005 Q4] 43 Is Business Intelligence in Your Business?
Thank you for Your Time I hope you enjoyed your few minutes of viewing what took intense months of training to accomplished 44 Is Business Intelligence in Your Business?

Contenu connexe

Tendances

Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASLynn Langit
 
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...Building your first Analysis Services Tabular BI Semantic model with SQL Serv...
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...Microsoft TechNet - Belgium and Luxembourg
 
Introduction to Cortana Analytics
Introduction to Cortana AnalyticsIntroduction to Cortana Analytics
Introduction to Cortana AnalyticsChris Testa-O'Neill
 
Data warehouse and ssas terms
Data warehouse and ssas termsData warehouse and ssas terms
Data warehouse and ssas termsKaran Gulati
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCode Mastery
 
Azure analysis services next step to bi in the cloud
Azure analysis services   next step to bi in the cloudAzure analysis services   next step to bi in the cloud
Azure analysis services next step to bi in the cloudGabi Münster
 
SSIS coding conventions, best practices, tips and programming guidelines for ...
SSIS coding conventions, best practices, tips and programming guidelines for ...SSIS coding conventions, best practices, tips and programming guidelines for ...
SSIS coding conventions, best practices, tips and programming guidelines for ...Vishal Pawar
 
New features of sql server 2016 bi features
New features of sql server 2016 bi featuresNew features of sql server 2016 bi features
New features of sql server 2016 bi featuresChris Testa-O'Neill
 
BI 2008 Simple
BI 2008 SimpleBI 2008 Simple
BI 2008 Simplellangit
 
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"DataConf
 
SQL Server 2008 Data Mining
SQL Server 2008 Data MiningSQL Server 2008 Data Mining
SQL Server 2008 Data Miningllangit
 
SQL Server 2008 Data Mining
SQL Server 2008 Data MiningSQL Server 2008 Data Mining
SQL Server 2008 Data Miningllangit
 
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015Terry Bunio
 
Amit Adhlakha Bi Portfolio
Amit Adhlakha Bi PortfolioAmit Adhlakha Bi Portfolio
Amit Adhlakha Bi PortfolioAmit Adhlakha
 
Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseCode Mastery
 
A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13sparkwan
 

Tendances (20)

Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSAS
 
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...Building your first Analysis Services Tabular BI Semantic model with SQL Serv...
Building your first Analysis Services Tabular BI Semantic model with SQL Serv...
 
SSAS Tabular model importance and uses
SSAS  Tabular model importance and usesSSAS  Tabular model importance and uses
SSAS Tabular model importance and uses
 
Introduction to Cortana Analytics
Introduction to Cortana AnalyticsIntroduction to Cortana Analytics
Introduction to Cortana Analytics
 
Data warehouse and ssas terms
Data warehouse and ssas termsData warehouse and ssas terms
Data warehouse and ssas terms
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis Services
 
Azure analysis services next step to bi in the cloud
Azure analysis services   next step to bi in the cloudAzure analysis services   next step to bi in the cloud
Azure analysis services next step to bi in the cloud
 
Sql Saturday Costa Rica-SSAS Tabular Model
Sql Saturday Costa Rica-SSAS Tabular ModelSql Saturday Costa Rica-SSAS Tabular Model
Sql Saturday Costa Rica-SSAS Tabular Model
 
SSIS coding conventions, best practices, tips and programming guidelines for ...
SSIS coding conventions, best practices, tips and programming guidelines for ...SSIS coding conventions, best practices, tips and programming guidelines for ...
SSIS coding conventions, best practices, tips and programming guidelines for ...
 
New features of sql server 2016 bi features
New features of sql server 2016 bi featuresNew features of sql server 2016 bi features
New features of sql server 2016 bi features
 
BI 2008 Simple
BI 2008 SimpleBI 2008 Simple
BI 2008 Simple
 
Sql server 2012 tutorials analysis services tabular modeling
Sql server 2012 tutorials   analysis services tabular modelingSql server 2012 tutorials   analysis services tabular modeling
Sql server 2012 tutorials analysis services tabular modeling
 
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
Sergiy Lunyakin "Cloud BI with Azure Analysis Services"
 
SQL Server 2008 Data Mining
SQL Server 2008 Data MiningSQL Server 2008 Data Mining
SQL Server 2008 Data Mining
 
SQL Server 2008 Data Mining
SQL Server 2008 Data MiningSQL Server 2008 Data Mining
SQL Server 2008 Data Mining
 
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
 
Amit Adhlakha Bi Portfolio
Amit Adhlakha Bi PortfolioAmit Adhlakha Bi Portfolio
Amit Adhlakha Bi Portfolio
 
Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model Database
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13
 

En vedette

Microsoft SSAS: Should I Use Tabular or Multidimensional?
Microsoft SSAS: Should I Use Tabular or Multidimensional?Microsoft SSAS: Should I Use Tabular or Multidimensional?
Microsoft SSAS: Should I Use Tabular or Multidimensional?Senturus
 
Using SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesUsing SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesCode Mastery
 
Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)Anurag Rana
 
Building SSRS 2008 large scale solutions
Building SSRS 2008 large scale solutionsBuilding SSRS 2008 large scale solutions
Building SSRS 2008 large scale solutionsDenny Lee
 
Ssis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liSsis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liHong-Bing Li
 
Unlocking the Mystery of MDX
Unlocking the Mystery of MDXUnlocking the Mystery of MDX
Unlocking the Mystery of MDXDATAVERSITY
 
Multidimensional expressions mdx - reference
Multidimensional expressions   mdx - referenceMultidimensional expressions   mdx - reference
Multidimensional expressions mdx - referenceSteve Xu
 
Citrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature BriefCitrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature BriefNuno Alves
 
2012 Acura MDX Brochure | DCH Acura of Temecula
2012 Acura MDX Brochure | DCH Acura of Temecula2012 Acura MDX Brochure | DCH Acura of Temecula
2012 Acura MDX Brochure | DCH Acura of TemeculaDCH Acura of Temecula
 
Mdx university dubai courses
Mdx university dubai coursesMdx university dubai courses
Mdx university dubai coursesanjam tm
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioDoug Armantrout
 
Getting Started with MDX 20140625a
Getting Started with MDX 20140625aGetting Started with MDX 20140625a
Getting Started with MDX 20140625aRon Moore
 
SQL Server Analysis Services and MDX
SQL Server Analysis Services and MDXSQL Server Analysis Services and MDX
SQL Server Analysis Services and MDXMark Ginnebaugh
 
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)Daniel Upton
 
IBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding TechniquesIBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding TechniquesSenturus
 

En vedette (19)

SSRS for DBA's
SSRS for DBA'sSSRS for DBA's
SSRS for DBA's
 
Microsoft SSAS: Should I Use Tabular or Multidimensional?
Microsoft SSAS: Should I Use Tabular or Multidimensional?Microsoft SSAS: Should I Use Tabular or Multidimensional?
Microsoft SSAS: Should I Use Tabular or Multidimensional?
 
Using SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesUsing SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS Cubes
 
Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)Presentation 1 - SSRS (1)
Presentation 1 - SSRS (1)
 
Building SSRS 2008 large scale solutions
Building SSRS 2008 large scale solutionsBuilding SSRS 2008 large scale solutions
Building SSRS 2008 large scale solutions
 
Ssis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_liSsis sql ssrs_sp_ssas_mdx_hb_li
Ssis sql ssrs_sp_ssas_mdx_hb_li
 
Mdx complex-queries-130019
Mdx complex-queries-130019Mdx complex-queries-130019
Mdx complex-queries-130019
 
Unlocking the Mystery of MDX
Unlocking the Mystery of MDXUnlocking the Mystery of MDX
Unlocking the Mystery of MDX
 
Multidimensional expressions mdx - reference
Multidimensional expressions   mdx - referenceMultidimensional expressions   mdx - reference
Multidimensional expressions mdx - reference
 
Citrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature BriefCitrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature Brief
 
2012 Acura MDX Brochure | DCH Acura of Temecula
2012 Acura MDX Brochure | DCH Acura of Temecula2012 Acura MDX Brochure | DCH Acura of Temecula
2012 Acura MDX Brochure | DCH Acura of Temecula
 
Mdx university dubai courses
Mdx university dubai coursesMdx university dubai courses
Mdx university dubai courses
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Getting Started with MDX 20140625a
Getting Started with MDX 20140625aGetting Started with MDX 20140625a
Getting Started with MDX 20140625a
 
Introduction to mdx query ppt
Introduction to mdx query pptIntroduction to mdx query ppt
Introduction to mdx query ppt
 
SQL Server Analysis Services and MDX
SQL Server Analysis Services and MDXSQL Server Analysis Services and MDX
SQL Server Analysis Services and MDX
 
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)
Enhancing Dashboard Visuals with Multi-Dimensional Expressions (MDX)
 
IBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding TechniquesIBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding Techniques
 
MDX 2015-2019 Work Program Overview presentation, October 22, 2014
MDX 2015-2019 Work Program Overview presentation, October 22, 2014MDX 2015-2019 Work Program Overview presentation, October 22, 2014
MDX 2015-2019 Work Program Overview presentation, October 22, 2014
 

Similaire à SSAS and MDX

Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 
Brian Adams
Brian AdamsBrian Adams
Brian Adamsbrad817
 
Value Validation Project - Example.pdf
Value Validation Project - Example.pdfValue Validation Project - Example.pdf
Value Validation Project - Example.pdfRivaldy Varianto
 
Nitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence PortfolioNitin\'s Business Intelligence Portfolio
Nitin\'s Business Intelligence Portfolionpatel2362
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioflodhi
 
SSAS Project Profile
SSAS Project ProfileSSAS Project Profile
SSAS Project Profiletthompson0421
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioeileensauer
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolioeileensauer
 
Lean Stack - A Story Of Continuous Improvement
Lean Stack - A Story Of Continuous ImprovementLean Stack - A Story Of Continuous Improvement
Lean Stack - A Story Of Continuous ImprovementLukas Fittl
 
Simple business plan template
Simple business plan templateSimple business plan template
Simple business plan templateupmetrics.co
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1guest9529cb
 
How to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeHow to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeAtScale
 
Business Case Template
Business Case TemplateBusiness Case Template
Business Case Templateupmetrics.co
 
Business planning & policy management
Business planning & policy managementBusiness planning & policy management
Business planning & policy managementsmumbahelp
 
Analytics Cloud - Comprehensive Look to Data Visualization
Analytics Cloud - Comprehensive Look to Data Visualization Analytics Cloud - Comprehensive Look to Data Visualization
Analytics Cloud - Comprehensive Look to Data Visualization Alithya
 
Analytics Cloud Comprehensive Look to Data Visualization
Analytics Cloud Comprehensive Look to Data VisualizationAnalytics Cloud Comprehensive Look to Data Visualization
Analytics Cloud Comprehensive Look to Data VisualizationAlithya
 
KPI Calculus for BSC Performance & Progress Estimation
KPI Calculus for BSC Performance & Progress EstimationKPI Calculus for BSC Performance & Progress Estimation
KPI Calculus for BSC Performance & Progress EstimationFarooq Omar
 
limpinpresentation-170329032435.pptx
limpinpresentation-170329032435.pptxlimpinpresentation-170329032435.pptx
limpinpresentation-170329032435.pptxJPAballe
 

Similaire à SSAS and MDX (20)

Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Brian Adams
Brian AdamsBrian Adams
Brian Adams
 
Value Validation Project - Example.pdf
Value Validation Project - Example.pdfValue Validation Project - Example.pdf
Value Validation Project - Example.pdf
 
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
 
SSAS Project Profile
SSAS Project ProfileSSAS Project Profile
SSAS Project Profile
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
Lean Stack - A Story Of Continuous Improvement
Lean Stack - A Story Of Continuous ImprovementLean Stack - A Story Of Continuous Improvement
Lean Stack - A Story Of Continuous Improvement
 
Simple business plan template
Simple business plan templateSimple business plan template
Simple business plan template
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
 
How to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeHow to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on Snowflake
 
Business Case Template
Business Case TemplateBusiness Case Template
Business Case Template
 
Business planning & policy management
Business planning & policy managementBusiness planning & policy management
Business planning & policy management
 
Rough cut connect2-xyz
Rough cut connect2-xyzRough cut connect2-xyz
Rough cut connect2-xyz
 
Analytics Cloud - Comprehensive Look to Data Visualization
Analytics Cloud - Comprehensive Look to Data Visualization Analytics Cloud - Comprehensive Look to Data Visualization
Analytics Cloud - Comprehensive Look to Data Visualization
 
Analytics Cloud Comprehensive Look to Data Visualization
Analytics Cloud Comprehensive Look to Data VisualizationAnalytics Cloud Comprehensive Look to Data Visualization
Analytics Cloud Comprehensive Look to Data Visualization
 
KPI Calculus for BSC Performance & Progress Estimation
KPI Calculus for BSC Performance & Progress EstimationKPI Calculus for BSC Performance & Progress Estimation
KPI Calculus for BSC Performance & Progress Estimation
 
limpinpresentation-170329032435.pptx
limpinpresentation-170329032435.pptxlimpinpresentation-170329032435.pptx
limpinpresentation-170329032435.pptx
 
SSIS
SSISSSIS
SSIS
 

SSAS and MDX

  • 1. Carmen Faber MBA, OCP Wharton, NJ carmenfaber@gmail.com Business Intelligence Suite Developer 1 Is Business Intelligence in Your Business?
  • 2. Portfolio Overview This portfolio contains selected examples of my development skills using Microsoft Business Intelligence SSAS and Sample MDX using BIDS SSAS using Microsoft Visual Studio page 3-20 MDX – Multi-Dimensional Queries Cube Structure Various sample Queries - page 21-43 Data Source View Dimension Usage Job Master Dimension Structure / Hierarchy Sample SSAS Calculation Calculation – Open Receivable Percent of Inventory Calculation – Total Cost Calculation - Overhead Percent of Total Cost Calculation - Total Profit Calculation - Profit Percent Calculation - Job Increase Calculation - Overhead Percent Increase Sample SSAS KPIs KPI Open Receivable KPI Job Increase KPI Profit Percent KPI Overhead Percent Increase KPI Profit Percent Partitions Perspective Test using Browser 2 Is Business Intelligence in Your Business?
  • 3. SSAS Project All Works Cube (Measures/Fact and Dimension) 3 Is Business Intelligence in Your Business?
  • 4. SSAS Project Data Source View 4 Is Business Intelligence in Your Business?
  • 5. SSAS Project Dimension Usage 5 Is Business Intelligence in Your Business?
  • 6. SSAS Project – Job Master Dimension Structure / Hierarchy 6 Is Business Intelligence in Your Business?
  • 7. SSAS Project – Calculation – Open Receivable Percent of Inventory CASE WHEN [Measures].[Invoice Amount] = 0 THEN -1. ELSE ([Measures].[Invoice Amount]-[Measures].[Amount Received])/[Measures].[Invoice Amount] END 7 Is Business Intelligence in Your Business?
  • 8. SSAS Project – Calculation – Total Cost [Measures].[Total Overhead] + [Measures].[Total Material Cost]+ [Measures].[Total Labor Cost] 8 Is Business Intelligence in Your Business?
  • 9. SSAS Project – Overhead Percent of Total Cost CASE WHEN [Measures].[Total Overhead] / [Measures].[TotalCost] = 0 THEN 0 ELSE [Measures].[Total Overhead] / [Measures].[TotalCost] END 9 Is Business Intelligence in Your Business?
  • 10. SSAS Project – Total Profit [Measures].[Total Labor Profit] + [Measures].[Total Material Profit] +[Measures].[Additional Labor Profit] 10 Is Business Intelligence in Your Business?
  • 11. SSAS Project – Profit Percent CASE WHEN [Measures].[TotalCost] = 0 THEN '100%' ELSE [Measures].[TotalProfit] / ([Measures].[TotalCost] +[Measures].[TotalProfit]) END 11 Is Business Intelligence in Your Business?
  • 12. SSAS Project – Job Increase [Measures].[Job Summary Facts Count] - ([Measures].[Job Summary Facts Count] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) 12 Is Business Intelligence in Your Business?
  • 13. SSAS Project – Overhead Percent Increase CASE WHEN ([Measures].[Weekly Over Head] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) = 0 THEN 1 ELSE ([Measures].[Weekly Over Head] - ([Measures].[Weekly Over Hea d] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1))) /([Measures].[Weekly Over Head] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 1)) END 13 Is Business Intelligence in Your Business?
  • 14. SSAS Project – KPI Open Receivable CASE WHEN KPIVALUE("KPIOpenReceivable") <= KPIGOAL( "KPIOpenReceivable") THEN 1 WHEN KPIVALUE("KPIOpenReceivable")>= KPIGOAL( "KPIOpenReceivable") AND KPIVALUE("KPIOpenReceivable")<= KPIGOAL( "KPIOpenReceivable") * 2 THEN 0 WHEN KPIVALUE("KPIOpenReceivable")> KPIGOAL( "KPIOpenReceivable")* 2 THEN -1 END 14 Is Business Intelligence in Your Business?
  • 15. SSAS Project – KPI Job Increase CASE WHEN KPIVALUE("KPIJobIncrease") >= KPIGOAL( "KPIJobIncrease") THEN 1 WHEN KPIVALUE("KPIJobIncrease") < KPIGOAL( "KPIJobIncrease") THEN -1 END 15 Is Business Intelligence in Your Business?
  • 16. SSAS Project – KPI Profit Percent CASE WHEN KPIVALUE("KPIProfitPercent") > KPIGOAL( "KPIProfitPercent") THEN 1 WHEN KPIVALUE("KPIProfitPercent") >= (KPIGOAL( "KPIProfitPercent")/3) AND KPIVALUE("KPIProfitPercent") <= KPIGOAL( "KPIProfitPercent") THEN 0 WHEN KPIVALUE("KPIProfitPercent") < (KPIGOAL( "KPIProfitPercent")/ 3) THEN -1 END 16 Is Business Intelligence in Your Business?
  • 17. SSAS Project – KPI Overhead Percent Increase CASE WHEN KPIVALUE("KPIOverheadPercentIncrease") <= KPIGOAL( "KPIOverheadPercentIncrease") THEN 1 WHEN KPIVALUE("KPIOverheadPercentIncrease") >= KPIGOAL( "KPIOverheadPercentIncrease") AND KPIVALUE("KPIOverheadPercentIncrease") <= KPIGOAL( "KPIOverheadPercentIncrease") * 1.5 THEN 0 WHEN KPIVALUE("KPIOverheadPercentIncrease") > KPIGOAL( "KPIOverheadPercentIncrease") * 1.5 THEN -1 END 17 Is Business Intelligence in Your Business?
  • 18. SSAS Project – Partitions 18 Is Business Intelligence in Your Business?
  • 19. SSAS Project – Perspective 19 Is Business Intelligence in Your Business?
  • 20. SSAS Project – Test using Browser 20 Is Business Intelligence in Your Business?
  • 21. MDX – Multi-Dimensional Queries List Hours Worked and Total Labor for each employee for 2005, -- along with the labor rate (Total labor / Hours worked). WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY( [Employees].[Full Name].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 21 Is Business Intelligence in Your Business?
  • 22. MDX – Multi-Dimensional Queries Retrieve total labor costs by County SELECT [Measures].[Total Labor Cost]ON COLUMNS, non empty([Job Master].[County Name].members) ON ROWS FROM [All WorksCube] 22 Is Business Intelligence in Your Business?
  • 23. MDX – Multi-Dimensional Queries Retrieve total labor costs by Division SELECT [Measures].[Total Labor Cost]ON COLUMNS, non empty([Job Master].[Division Name].members) ON ROWS FROM [All WorksCube] 23 Is Business Intelligence in Your Business?
  • 24. MDX – Multi-Dimensional Queries Retrieve total labor costs by Client Account grouping SELECT [Measures].[Total Labor Cost]ON COLUMNS, non empty([Job Master].[Client Groupings].members) ON ROWS FROM [All WorksCube] 24 Is Business Intelligence in Your Business?
  • 25. MDX – Multi-Dimensional Queries Retrieve 3 meatures…total labor cost, total material cost, and total overhead by client SELECT {[Total Labor Cost], [Total Material Cost], [Total Overhead]}ON COLUMNS, non empty([Job Master].[Client Name].MEMBERS) ON ROWS FROM [All WorksCube] 25 Is Business Intelligence in Your Business?
  • 26. MDX – Multi-Dimensional Queries Retrieve 3 meatures…total labor cost, total material cost, and total overhead by client Do the same (retrieve 3 measures) and add a 4th measure, -- a calculated measure, that adds all three costs WITH MEMBER [AllCosts] AS [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] SELECT {[Total Labor Cost], [Total Material Cost], [Total Overhead], [AllCosts]}ON COLUMNS, non empty([Job Master].[Client Name].MEMBERS) ON ROWS FROM [All WorksCube] 26 Is Business Intelligence in Your Business?
  • 27. MDX – Multi-Dimensional Queries Retrieve and calculate the total costs, the total profit, and total profit %, for each individual job. The three are calculated as follows: -- 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 WITH MEMBER [TotalCosts] AS [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] MEMBER [TotalProfit] AS [Total Labor Profit]+ [Total Material Profit]+ [Additional Labor Profit] MEMBER [ProfitPct] AS ([TotalProfit] / ([TotalCosts]+[TotalProfit]) ) , format_string = 'percent‘ SELECT {[TotalCosts], [TotalProfit], [ProfitPct] }ON COLUMNS, NON EMPTY ([Job Master].[Description].members) HAVING [ProfitPct] > 0 ON ROWS FROM [All WorksCube] 27 Is Business Intelligence in Your Business?
  • 28. MDX – Multi-Dimensional Queries Retrieve and calculate the total costs, the total profit, and total profit %, for each individual job. The three are calculated as follows: -- 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 Do the same thing as above, but group it by client WITH MEMBER [TotalCosts] AS [Total Labor Cost]+ [Total Material Cost]+ [Total Overhead] MEMBER [TotalProfit] AS [Total Labor Profit]+ [Total Material Profit]+ [Additional Labor Profit] MEMBER [ProfitPct] AS ([TotalProfit] / ([TotalCosts]+[TotalProfit]) ) , format_string = 'percent' SELECT {[TotalCosts], [TotalProfit], [ProfitPct] }ON COLUMNS, NON EMPTY ([Job Master].[Client Name].members) ON ROWS FROM [All WorksCube] 28 Is Business Intelligence in Your Business?
  • 29. MDX – Multi-Dimensional Queries Display a count of Jobs by Client in alphabetical order. Display NULLs as 0. WITH MEMBER [JobSummaryFactsCount] as IIF ([MEASURES].[Job Summary Facts Count] > 0, [MEASURES].[Job Summary Facts Count], 0) SELECT [JobSummaryFactsCount] ON COLUMNS, [Job Master].[Client Name].MEMBERS ON ROWS FROM [All WorksCube] 29 Is Business Intelligence in Your Business?
  • 30. MDX – Multi-Dimensional Queries Retrieve all Clients with a Total Labor cost to date greater than 5,000, and the word 'INC' appears in the client name SELECT [Total Labor Cost]ON COLUMNS, filter([Job Master].[Client Name].CHILDREN, Instr([Job Master].[Client Name].CurrentMember.Name, "INC") AND [Total Labor Cost]> 5000 ) ON ROWS FROM [All WorksCube] 30 Is Business Intelligence in Your Business?
  • 31. MDX – Multi-Dimensional Queries List the jobs that make up the top 30% of total invoice amount Select [Measures].[Invoice Amount] on columns, TopPercent([Job Master].[Job Master].children, 30,[Measures].[Invoice Amount]) on Rows from[All WorksCube] 31 Is Business Intelligence in Your Business?
  • 32. MDX – Multi-Dimensional Queries Show Overhead by Overhead Category for Q3 and Q4 2005 (hint, use the FY Qtr as a dimension) SELECT {[Fy Qtr].[2005 Q3], [Fy Qtr].&[2005 Q4]} ON COLUMNS, non empty ([Overhead].[Overhead].MEMBERS) ON ROWS FROM [All WorksCube] WHERE [Weekly Over Head] 32 Is Business Intelligence in Your Business?
  • 33. MDX – Multi-Dimensional Queries Show Overhead by Overhead Category for Q3 and Q4 2005, and also show the % of change between the two) WITH member [ovheadCurrentPeriod] as ([Measures].[Weekly Over Head], [Fy Qtr].currentmember) member [ovheadPriorPeriod] as ([Measures].[Weekly Over Head], [Fy Qtr].prevmember) member [PctofCHG] AS iif([ovheadPriorPeriod], ([ovheadCurrentPeriod] - [ovheadPriorPeriod])/ [ovheadPriorPeriod], null), format_string = '0.00%;;;/A' SELECT {[ovheadCurrentPeriod], [ovheadPriorPeriod], [PctofCHG] } ON COLUMNS, non empty([Overhead].[Description].MEMBERS) ON ROWS FROM [All WorksCube] WHERE [Fy Qtr].[2005 Q4] 33 Is Business Intelligence in Your Business?
  • 34. MDX – Multi-Dimensional Queries Show Overhead by Overhead Category for all of 2005, order by Overhead $$ amount descending WITH SET [OrderOverhead] AS ORDER([Overhead].[Overhead].MEMBERS, [Weekly Over Head], DESC) SELECT [Weekly Over Head] ON COLUMNS, non empty ( [OrderOverhead]) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 34 Is Business Intelligence in Your Business?
  • 35. MDX – Multi-Dimensional Queries Show Material Purchase amounts by Material Type for 2005. The result set should have 1 column for the purchase amounts for Fuel, Materials, and petty Cash SELECT [Purchase Amount] ON COLUMNS, [Material Types].[Description].members ON ROWS FROM [All WorksCube] 35 Is Business Intelligence in Your Business?
  • 36. MDX – Multi-Dimensional Queries Show Material purchase amounts for 2005, broken out by Material Purchase type and client. (for instance, Fuel for client A, B, C…Petty Cash for client A, B, C, etc.) Display NULLs as $0.00 WITH MEMBER [PurchaseAmt] as IIF ([MEASURES].[Purchase Amount] > 0, [Purchase Amount], 0), format_string = 'currency' SELECT [PurchaseAmt] ON COLUMNS, ([Material Types].[Description].children, [Client Name].children) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 36 Is Business Intelligence in Your Business?
  • 37. MDX – Multi-Dimensional Queries Show a list of total client material purchases for 2005, in descending purchase amount order. The result set should show at the top which client required the most materials. WITH SET [OrderClientPurchAmt] AS order( [Client Name].children, [Purchase Amount], desc) SELECT [Purchase Amount] ON COLUMNS, non empty ( [OrderClientPurchAmt] ) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 37 Is Business Intelligence in Your Business?
  • 38. MDX – Multi-Dimensional Queries -- 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.) The general order should be by -- total purchase amount, so that the top of the result set -- shows the jobs that required the highest purchase amounts WITH SET [OrderedJOB] AS ORDER( [Job Master].[Job Master].CHILDREN, [Purchase Amount], desc) MEMBER [PurchaseAmt] AS IIF ([Purchase Amount]> 0, [Purchase Amount], 0), format_string = 'currency' SELECT [PurchaseAmt] ON COLUMNS, ([OrderedJOB], [Material Types].[Description].members) ON ROWS FROM [All WorksCube] 38 Is Business Intelligence in Your Business?
  • 39. MDX – Multi-Dimensional Queries List Hours Worked and Total Labor for each employee for 2005, along with the labor rate (Total labor / Hours worked). WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY( [Employees].[Full Name].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 39 Is Business Intelligence in Your Business?
  • 40. MDX – Multi-Dimensional Queries 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[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, NON EMPTY( ORDER ([Employees].[Full Name].members, [LaborRate], bDESC) ) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 40 Is Business Intelligence in Your Business?
  • 41. MDX – Multi-Dimensional Queries For 2005, show Total Hours worked, total labor dollars, and total labor rate for contractors (employee flag is false) and employees (employee flag is true) WITH MEMBER[LaborRate] AS ([Total Labor] / [Hoursworked]) SELECT {[Hoursworked],[Total Labor], [LaborRate]} ON COLUMNS, non empty ([Employees].[Employee Flag].members) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 41 Is Business Intelligence in Your Business?
  • 42. MDX – Multi-Dimensional 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 WITH SET [JobTop3emp] AS GENERATE( [Job Master].[Description].children , ([Job Master].[Description].currentmember, topcount( [Employees].[Employees].children, 3, [Hoursworked]) ) ) SELECT [Hoursworked] ON COLUMNS, non empty ( [JobTop3emp] ) ON ROWS FROM [All WorksCube] WHERE [Fy Year].[2005] 42 Is Business Intelligence in Your Business?
  • 43. MDX – Multi-Dimensional Queries Show All employees for 2005 Q4, and four periods ago, -- for total hours worked in the Quarter -- Display NULLs as 0 with member [HrsWrkParamWhereCLausewhichisQ42005] as IIF ( ([Fy Qtr].currentmember,[Measures].[Hoursworked] ) > 0, ([Fy Qtr].currentmember,[Measures].[Hoursworked] ), 0) member [HrsWrk4PeriodsAgo] as IIF ( ([Measures].[Hoursworked] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 4)) > 0, ([Measures].[Hoursworked] , ParallelPeriod ([Fy Qtr].[Fy Qtr], 4)), 0) SELECT { [HrsWrk4PeriodsAgo] , [HrsWrkParamWhereCLausewhichisQ42005]} ON COLUMNS, [Employees].[Full Name].children ON ROWS FROM [All WorksCube] WHERE [Fy Qtr].[2005 Q4] 43 Is Business Intelligence in Your Business?
  • 44. Thank you for Your Time I hope you enjoyed your few minutes of viewing what took intense months of training to accomplished 44 Is Business Intelligence in Your Business?