Solving Business Problems In OLAP Services Using MDX – Part I Amir Netz – Dev Manager & Architect Ariel Netz – Program Manager SQL Server OLAP Services.

Slides:



Advertisements
Similar presentations
Atlanta.MDF MDX Overview. What Is MDX? MDX is Multi Dimensional EXpressions MDX is the syntax for querying an Analysis Services database MDX is part of.
Advertisements

Data Warehousing and Decision Support, part 2
OASUS: FALL 2008 Introduction to SAS OLAP: A Solution for the Curious and Impatient Presented by: Josée Ranger-Lacroix SAS Institute (Canada) Inc.
SQL Server Accelerator for Business Intelligence (SSABI)
Case Projects in Data Warehousing and Data Mining Mohammad A. Rob & Michael E. Ellis University of Houston-Clear Lake Houston, Texas
Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at.
Technical BI Project Lifecycle
5.1Database System Concepts - 6 th Edition Chapter 5: Advanced SQL Advanced Aggregation Features OLAP.
OLAP Services Business Intelligence Solutions. Agenda Definition of OLAP Types of OLAP Definition of Cube Definition of DMR Differences between Cube and.
Modeling and Querying Multidimensional Data Sources in Siebel Analytics Kazi A. Zaman Donovan A. Schneider
Using Measures. Types of Measures Additive – A Measure Where the Value of a Member Is the Sum of Its Children At Any Level of Any Dimension Amount Units.
Data Sources Data Warehouse Analysis Results Data visualisation Analytical tools OLAP Data Mining Overview of Business Intelligence Data visualisation.
Implementing Business Analytics with MDX Chris Webb London September 29th.
CSE6011 Warehouse Models & Operators  Data Models  relations  stars & snowflakes  cubes  Operators  slice & dice  roll-up, drill down  pivoting.
Microsoft SQL Server 2012 Analysis Services (SSAS) Reporting Services (SSRS)
Introduction to OLAP cubes My name: ZULFIQAR SYED Holds BSEE from Illinois Institute of Technology, Chicago, ILLINOIS. Holds BSEE from Illinois Institute.
Introduction Paul Turley SqlServerBiBlog.com Mentor, SQL Server MVP
Understanding Analysis Services Architecture. Microsoft Data Warehousing Overview OLTP Source DTS DW Storage Analysis Services Clients OLE DB for OLAP,
Ahsan Abdullah 1 Data Warehousing Lecture-12 Relational OLAP (ROLAP) Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for Agro-Informatics.
Introduction to Solving Business Problems with MDX Robert Zare and Tom Conlon Program Managers Microsoft.
Override the title Chris Harrington
Analysis Services 101 Dave Fackler, MCDBA, MCSE, MCT Director, Business Intelligence Practice Intellinet Corporation.
Interactive Reporting Technology Overview John Sullivan, CEO of Interactive Reporting June 2008.
Solving Business Problems in OLAP Services Using MDX - Part II Amir Netz – Dev Manager & Architect Ariel Netz – Program Manager SQL Server OLAP Services.
Objects for Business Reporting MIS 497. Objective Learn about miscellaneous objects required for business reporting. Learn about miscellaneous objects.
Ahsan Abdullah 1 Data Warehousing Lecture-11 Multidimensional OLAP (MOLAP) Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for.
OLAP Theory-English version On-Line Analytical processing (Business Intelligence) [Ing.J.Skorkovský,CSc.] Department of corporate economy.
OnLine Analytical Processing (OLAP)
MDX in SQL Server 2008 Szymon Wilk (na podstawie materiałów przygotowanych przez Krzysztofa Dembczyńskiego) TWO, 2009/10.
Introduction to Analysis Services and OLAP Technology Tom Conlon and Rob Zare Program Managers SQL Server Business Intelligence Unit Microsoft Corp.
Using SAS® Information Map Studio
Data Warehouse. Design DataWarehouse Key Design Considerations it is important to consider the intended purpose of the data warehouse or business intelligence.
OLAP Council APB-1 OLAP Benchmark Release II
Roadmap 1.What is the data warehouse, data mart 2.Multi-dimensional data modeling 3.Data warehouse design – schemas, indices 4.The Data Cube operator –
Building the cube – Chapter 9 & 10 Let’s be over with it.
Using SQL to Query Oracle OLAP Cubes Bud Endress Director of Product Management, OLAP.
BI Terminologies.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
In this session, you will learn to: Use functions to customize the result set Summarize and group data Objectives.
Implementing Calculations Using MDX. Drinks Tea Lemon Earl Grey Coffee Columbian Dimension Family Relationships  Drinks is the Parent of Tea and Coffee.
Sales Dim Date Dim Customers Dim Products Dim Categories Dim Geography The data warehouse is a simple and standard one, after all we.
Centre of Competence on data warehouse Workshop Helsinki Database Cube and Browsing the Cube Mark Rantala.
MDX Overview. What Is MDX? MDX is Multi Dimensional EXpressions MDX is the syntax for querying an Analysis Services database MDX is part of the OLE DB.
Mailto : for all Hyperion video tutorial/Training/Certification/Material Understanding MDX with BSO and ASO.
Advanced MDX Subtitle (Arial regular 20 point) XX Month 200X (Arial regular 16 point)
DAT 378 SQL Server 2000 Bringing The Best of Reporting Services and Analysis Services Together Sean Boon Program Manager, BI Systems
11 SAP & SQL Server 2005 Analysis Services Integration Microsoft Corporation SAP-Microsoft Competence Center (Tokyo) Microsoft Corporation SAP-Microsoft.
8 Copyright © 2006, Oracle. All rights reserved. Previewing Advanced Oracle OLAP Features.
1 Copyright © 2006, Oracle. All rights reserved. Defining OLAP Concepts.
Or How I Learned to Love the Cube…. Alexander P. Nykolaiszyn BLOG:
Data Warehousing and OLAP Outline u Models & operations u Implementing a warehouse u Future directions.
The Concepts of Business Intelligence Microsoft® Business Intelligence Solutions.
INTRODUCTION TO MDX. Stick around for RAFFLE and the AFTER EVENT!  All our volunteers and organisers do not get paid for organizing this event – If.
Introduction to SQL Server Analysis Services
Data Warehousing CIS 4301 Lecture Notes 4/20/2006.
6/19/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Oracle OLAP Creating Cubes Part 1: Concepts
Data Analysis with SQL Window Functions
SQL/OLAP Sang-Won Lee Let’s e-Wha! URL: Jul. 12th, 2001 SQL/OLAP
Business Intelligence
DATA CUBE Advanced Databases 584.
Oracle Analytic Views Enhance BI Applications and Simplify Development
Introduction to tabular models
Using SQL to Prepare Data for Analysis
Introduction to tabular models
Enhance BI Applications and Simplify Development
A New Storage Engine Specialized for MOLAP
Data Analysis with SQL Window Functions
Slides based on those originally by : Parminder Jeet Kaur
Presentation transcript:

Solving Business Problems In OLAP Services Using MDX – Part I Amir Netz – Dev Manager & Architect Ariel Netz – Program Manager SQL Server OLAP Services Microsoft Corporation Global Breakout Session Hardware Provider

Yes, We Are Brothers.

Agenda  What is MDX?  MDX Basics  MDX Queries  Solving Business Problems with MDX

Functionality Knowledge Required Required Knowing MDX

What Is MDX  MDX = Multi Dimensional Expressions  A syntax for modeling and querying an OLAP database  Part of the OLE DB for OLAP Spec  Supported by multiple providers (OLAP Services, TM1, SAS, WhiteLight, SAP…)  It is the key for all advanced analytical capabilities of OLAP Services

MDX Basics  MDX allows easy navigation in the multi dimensional space  It “understands” the MD concepts of cube, dimension, level, member and cell  It is used for Queries – full statements (SELECT…FROM) Queries – full statements (SELECT…FROM) Business modeling – defining calculated members Business modeling – defining calculated members

MDX Constructs  Member : Nelson, [1996].[Q1].[Jan] Nelson, [1996].[Q1].[Jan]  Tuple : (Nelson, USA), (Computers, [1996]) (Nelson, USA), (Computers, [1996])  Sets : {Nelson, White} {Nelson, White} { (Computers, USA), (Printers, Japan) } { (Computers, USA), (Printers, Japan) } [1996].Children [1996].Children TopCount(SalesReps.Members, 10, Sales) TopCount(SalesReps.Members, 10, Sales)

MDX Queries  SELECT sets on axes (N axes)  FROM a source cube  WHERE the data is sliced by some coordinates

Sample Cube  Dimensions: Measures: Sales, Cost, Units Measures: Sales, Cost, Units Time: Year, Quarter, Month Time: Year, Quarter, Month Geography: All, Region, Country Geography: All, Region, Country Products: All, Product Group, Product Name Products: All, Product Group, Product Name Customers: All, Customer Group, Customer Name Customers: All, Customer Group, Customer Name

Select Time.year.members on Rows, Measures.members on Columns, Product.[Product Department].members on Pages From Sales Sample MDX

Stage 1: Creating Axes Stage 2: Getting Cells’ Values GroceriesClothing Appliances SalesCostUnits Query Execution

Groceries Clothing Appliances SalesCostUnits (Products.Clothing, Measures.Units,Time. 98) (Products.Clothing, Measures.Sales,Time. 97) (Products.Groceries, Measures.Cost,Time.Year. 95) Every Cell Has A Name...

98 Clothing Units ? ? (Products.Clothing, Measures.Units,Time. 98.PrevMember) (Products.Clothing, Measures.Units,Time. 98.NextMember) Every Cell Still Has A Name...

98 Clothing Units ? (Products.Clothing, Measures.Units,Time. 98.PrevMember) ? (Products.Clothing, Measures.Units,Time. 98.NextMember) ? (Products.Clothing, Measures.Units.PrevMember,Time. 98.Lag(3)) (Products.Clothing, Measures.Units.PrevMember,Time. 98.Lead(-3)) OR Every Cell Still Has A Name...

Calculated Members  Calculated members are the real power behind OLAP  They provide the mean to define complex business logic  MDX is the syntax for calculated members Statements – tools, query generators, developers Statements – tools, query generators, developers Calculated members – DBAs and power users Calculated members – DBAs and power users

Groceries Clothing Appliances SalesCostUnits With member Measures.Growth as ‘(Time.currentmember,Measures.Sales)- (Time.currentmember.prevmember,Measures.Sales)’ Select Time.year.members on Rows, AddCalculatedMembers(Measures.members) on Columns, Product.[Product Department].members on Pages From Sales GrowthTime.95Empty 15 Time.CurrentMember Time.CurrentMember.PrevMember Sales Growth

Groceries Clothing Appliances SalesCostUnits With member Measures.Growth as ‘(Time.currentmember,Measures.Sales)- (Time.currentmember.prevmember,Measures.Sales)’ Select Time.year.members on Rows, AddCalculatedMembers(Measures.members) on Columns, Product.[Product Department].members on Pages From Sales Growth Time.96 Time Time.CurrentMember Time.CurrentMember.PrevMember Sales Growth

Groceries Clothing Appliances SalesCostUnits With member Measures.Growth as ‘(Time.currentmember,Measures.Sales)- (Time.currentmember.prevmember,Measures.Sales)’ Select Time.year.members on Rows, AddCalculatedMembers(Measures.members) on Columns, Product.[Product Department].members on Pages From Sales Growth Time.CurrentMember Time.CurrentMember.PrevMember Time.97 Time Sales Growth

Groceries Clothing Appliances SalesCostUnits With member Measures.Growth as ‘(Time.currentmember,Measures.Sales)- (Time.currentmember.prevmember,Measures.Sales)’ Select Time.year.members on Rows, AddCalculatedMembers(Measures.members) on Columns, Product.[Product Department].members on Pages From Sales Growth Time.98 Time Time.CurrentMember Time.CurrentMember.PrevMember Sales Growth

Groceries Clothing Appliances SalesCostUnits With member Measures.Growth as ‘(Time.currentmember,Measures.Sales)- (Time.currentmember.prevmember,Measures.Sales)’ Select Time.year.members on Rows, AddCalculatedMembers(Measures.members) on Columns, Product.[Product Department].members on Pages From Sales Growth Time.99 Time Time.CurrentMember Time.CurrentMember.PrevMember Sales Growth

GetCellValue(CurrentCell) Push CurrentCell CurrentCell  Measure = Sales L = GetCellValue(CurrentCell) PopPush CurrentCell CurrentCell  Measure = Sales CurrentCell  Time = CurrentCell  Time  Prevmember R = GetCellValue(CurrentCell) Pop CurrentCell Result = L - R (Growth, 98, Clothing) GetCellValue(CurrentCell) Member  Formula? No: Return Cell Member  Calculate(CurrentCell) (Growth, 98, Clothing) (Sales, 98, Clothing) (Growth, 98, Clothing) (Sales, 98, Clothing) (Sales, 97, Clothing) (Growth, 98, Clothing) R = Sales in 97 of Clothing L = Sales in 98 of Clothing = Growth in 98 of Clothing (Sales, 98, Clothing) (Sales, 97, Clothing) Growth : ( Sales,Time.CurrentMember) – (Sales,Time.CurrentMember.PrevMember) L=29 R=22 L-R=29-22=7

How did sales in this period compare with sales in the previous period? How did sales in the current period compare with the same period in the previous year? What is my total since the beginning of the year? “It’s Just A Question Of Time ….”

How Did Sales In This Period Compare With Sales In The Previous Period?

Time.CurrentMember, Measures.CurrentMember Time.CurrentMember,Measures.Sales Time.CurrentMember.PrevMember, Measures.Sales How Did Sales In This Period Compare With Sales In The Previous Period?

Sales How Did Sales In The Current Period Compare With The Same Period In The Previous Year?

20 (Measures,Sales,Time.CurrentMember)- (Measures.Sales,ParallelPeriod(Year,1,Time.CurrentMember)) Sales How Did Sales In The Current Period Compare With The Same Period In the Previous Year?

What Is My Total Since The Beginning Of The Year?

Sum(YTD(Time.CurrentMember),Sales) Time.Mar,Measures.Sales Time.Feb,Measures.Sales Time.Jan,Measures.Sales + + (Time.CurrentMember,Measures.Sales) + (Measures.YTD,Time.CurrentMember.Prevmember) YTD What Is My Total Since The Beginning Of The Year?

Navigating In The Hierarchy (The Family Tree)

Time.[97].parentTime.[98].parent Parents

Time.[97].FirstChild Children

Time.[97].Children Children

Descendants(Time.[97], Quarter) Descendants

Descendants(Time.[97], Month) Descendants

Descendants(Time.[Q1], Month) Descendants

Descendants(Time.[Jan], Month) Descendants

The Inventory Problem  A set of inventory snapshots over time Dimensions: Dimensions: Products: All Products, Family, Category, Name Warehouses: All, Warehouse Time: Year, Quarter, Month Measures: Measures: Quantity (SUM) Value (SUM)  The problem: measures are not additive over time

Problem: Inventory is not an additive value.. Inventory …….

The Business Problems…  Average quantities and stock values in each time period  Opening and closing balances for each time period  Minimum and maximum inventory levels in a time period  The relative contribution of the stocked item to the overall stock value

Avg( Descendants([Time].CurrentMember,[Month]), Quantity) Sum of quantities over all months in the period divided by The number of months in the period Sum ( months in the period, Quantity) / Count( months in the period ) Sum (Descendants([Time].CurrentMember,[Month]), Quantity) / Count(Descendants([Time].CurrentMember,[Month])) Average Over Time

Avg Inv : A vg(Descendants( [Time].CurrentMember, [Months]), Quantity) Average Over Time Push CurrentCell D = Descendents( CurrentCell  Time, Months) For Each t in D Apply(t, CurrentCell) CurrentCell  Measure = Quantity S = S + GetCellValue(CurrentCell) PopPush CurrentCell Next C = D  Count Result = S / C ([Avg Inv], Q398, WH1) GetCellValue(CurrentCell) Member  Formula? No: Return Cell Member  Calculate(CurrentCell) ([Avg Inv], Q398, WH1) ([Avg Inv], Jul98, WH1) (Quantity, Jul98, WH1) ([Avg Inv], 98, WH1) S = S + Jul98 Quantity in WH1 D = Months in Q398 = Sum of monthly inv./#months (Quantity, Jul98,WH1) = 55 (Quantity, Aug98, WH1) = 60 D = {Jul98, Aug 98, Sep98} S=55 Result = S/C = 185/3 =61.66 (Quantity, Sep98, WH1) = 70 S = S + Aug98 Quantity in WH1 S=115 S = S + Sep98 Quantity in WH1 S=185 C= Number of Q398 months C = 3 ([Avg Inv], Aug98, WH1) (Quantity, Aug98, WH1) ([Avg Inv], Sep98, WH1) (Quantity, Sep98, WH1) ([Avg Inv], 98, WH1)

Closing Balance Quantity of the last month in the period Quantity of the last month in the months contained in the period Quantity of the last item in (Descendants([Time].CurrentMember, [Month]) (Measures.Quantity, Tail(Descendants([Time].CurrentMember, [Month]),1)) (Measures.Quantity, ClosingPeriod([Month]))

(Inventory,ClosingPeriod(Month)) Closing Period Inventory Value…

Maximum Inventory Level In ATime Span Measures.[Maximum Inventory Value]: Max(Descendants( Time.CurrentMember,Time.Month), Measures.[Value])

Relative Contribution Measures.[Value Contribution to Total]: Measures.[Value] / (Measures.[Value], Products.[All], Warehouse.[All Warehouse])

Ranking Rank each product by sales among the other products In its category Rank( current product, other products on its category ordered by sales ) Rank(Products.CurrentMember, Order( other products on its category, Sales) Rank(Products.CurrentMember, Order( Products.CurrentMember.Parent.Children, Sales))