尊敬的 微信汇率:1円 ≈ 0.046239 元 支付宝汇率:1円 ≈ 0.04633元 [退出登录]
SlideShare a Scribd company logo
Unlocking the
Mystery of MDX
            Bryan Smith
    brysmi@microsoft.com
Objectives
                 Obj ti
Explain h d behind
E l i the modell b hi d MDX
        Explore lessons learned
The i
Th views and opinions expressed in this ....
           d ii               d i thi
(3)


                                              x
-4   -3   -2   -1   0   1   2   3         4
y




                4
                                     (3, 2)




                3
                2
                1
                                              x
-4   -3   -2   -1        1   2   3    4

                -2
                -3
                -4
y




                4
                                     (3, 2, 4)




                3
                2
                1
                                                 x
-4   -3   -2   -1        1   2   3       4

                -2
z
                -3
                -4
one-dimensional           (x)               single




two-dimensional            (x, y)           double




three-dimensionall
 h di i                     (x, )
                            ( y, z)         triple
                                              il



                     (a1, a2, a3, a4)
four-dimensional             (x, y, z, ?)   quadruple
four-dimensional
f di i l                   (a
                           ( 1 , a2 , a3 , a4 )        quadruple
                                                          d l

five-dimensional    (a1, a2, a3, a4, a5)               quintuple

six-dimensional     (a1, a2, a3, a4, a5, a6)           sextuple

seven-dimensional   (a1, a2, a3, a4, a5, a6, a7)       septuple

eight dimensional
eight-dimensional   (a1, a2, a3, a4, a5, a6, a7, a8)   octuple
four-dimensional
four dimensional           (a1, a2, a3, a4)            quadruple

five-dimensional    (a1, a2, a3, a4, a5)               quintuple

six-dimensional     (a1, a2, a3, a4, a5, a6)           sextuple

seven-dimensional   (a1, a2, a3, a4, a5, a6, a7)       septuple

eight dimensional
eight-dimensional   (a1, a2, a3, a4, a5, a6, a7, a8)   octuple




n-dimensional       (a1, a2, … an)                     tuple
My Simple Cube


      Measure Group

       Σ   Measure


      Dimension

           Attribute
My Simple Cube


    Reseller Sales                       Internet Sales

6    Σ Reseller Sales Amount              Σ Internet Sales Amount

    Date                       Product                       Geography
     1 Fiscal Year              3 Category                     5 Country

     2 Calendar Year            4 Subcategory
Product
P d t
     Category


                          All Products



    Accessories   Bikes                  Clothing   Components
Components
                                                 C
                     ([Bikes])




                                               Clo
                                                 othing
                                               Bike
                                                  es
                                                Accessories
                                                A
                                                Alll Products
          Category



                        [Product].[Category]
P d t
Product
(                                           (
     a1,
     [CY 2002],                              [Date].[Calendar Year].[CY 2002],
     [All Periods],
     a2,                                     [Date].[Fiscal Year].[All Periods],
     [Bikes],
     a3,                                     [Product].[Category].[Bikes],
     [All Products],
     a4,                                     [Product].[Subcategory].[All Products],
     [All Geographies],
     a5,                                     [Geography].[Country].[All Geographies],
     [Reseller Sales Amount]
     a6                                      [Measures].[Reseller Sales Amount]
    )                                       )


(
 [Geography].[Country].[All Geographies],
 [Product].[Category].[Bikes],
 [Measures].[Reseller Sales Amount],
 [ ][
 [Date].[Fiscal Year].[All Periods],
                    ][            ]
 [Product].[Subcategory].[All Products],
 [Date].[Calendar Year].[CY 2002]
)
(
(                                                                              [Date].[Calendar Year].[CY 2002],
    [Date].[Calendar Y ] [CY
    [D ] [C l d Year].[CY 2002], ]                                             [ ][
                                                                               [Date].[Fiscal Year].[All Periods],
                                                                                                  ][            ],
    [Product].[Category].[Bikes]                                               [Product].[Category].[Bikes]
)                                                                              [Product].[Subcategory].[All Products],
                                                                               [Geography].[Country].[All Geographies],
                                                                               [Measures].[Reseller Sales Amount]
                                                                           )




     Attributes                      Partial   Rule 1                  Rule 2                      Rule 3                 Completed
                                     Tuple     Default Member          (All) Member                First Member           Tuple

     Date.Calendar Year              CY 2002                                                                              CY 2002
     Date.Fiscal Year                                                  All Periods                                        All Periods
     Product.Category                Bikes                                                                                Bikes
     Product.Subcategory                                               All Products                                       All Products
     Geography.Country                                                 All Geographies                                    All Geographies
     Measures                                  Reseller Sales Amount                                                      Reseller Sales Amount
SELECT
     [Date].[Calendar Year].Members ON COLUMNS,
     [Product].[Category].Members ON ROWS
   FROM [My Simple Cube]




                                 All Periods       CY 2001       CY 2002       CY 2003       CY 2004
All Products                     $80,450,597      $8,065,435   $24,144,430   $32,202,669   $16,038,063
Accessories                        $571,298         $20,235       $92,735      $296,533      $161,794
Bikes                            $66,302,382      $7,395,349   $19,956,015   $25,551,775   $13,399,243
Clothing                          $1,777,840        $34,376      $485,587      $871,864      $386,013
Components                       $11,799,077        $34,376     $3,610,092    $5,482,497    $2,091,012
MDX
      SELECT
        [Date].[Calendar Y ] M b
        [D ] [C l d Year].Members ON COLUMNS,
                                         COLUMNS
        [Product].[Category].Members ON ROWS
      FROM [My Simple Cube]




SQL
      SELECT
        e.CalendarYear,
        d.EnglishProductCategoryName,
        SUM(a.SalesAmount)
      FROM FactResellerSales a
      INNER JOIN DimProduct b
        ON a.ProductKey=b.ProductKey
                 d       b d
      INNER JOIN DimProductSubcategory c
        ON b.ProductSubcategoryKey=c.ProductSubcategoryKey
      INNER JOIN DimProductCategory d
        ON c.ProductCategoryKey=d.ProductCategoryKey
      INNER JOIN DimDate e
        ON a.OrderDateKey=e.DateKey
      GROUP BY
        e.CalendarYear,
        d.EnglishProductCategoryName
MDX
      WITH MEMBER [Measures].[Total Sales Amount] AS
        [Measures].[Internet Sales Amount] + [Measures].[Reseller Sales Amount]
        [M       ] [I        Sl A         ] [M         ] [R ll S l A          ]
      SET [Top 10 Products of 2003] AS
        TOPCOUNT(
            [Product].[Product].[Product].Members, 10,
            ([Measures].[Total Sales Amount], [Date].[Calendar Year].[CY 2003])
            )
      SELECT
        [Measures].[Total Sales Amount] ON COLUMNS,
        [Top 10 Products of 2003] ON ROWS
      FROM [Step-by-Step]
      WHERE ([Date].[Calendar Year].[CY 2004])

SQL
      SELECT
        m.EnglishProductName,
        o.TotalSalesAmount
      FROM dbo.DimProduct m
      INNER JOIN ( -- TOP 10 PRODUCTS OF 2003
        SELECT TOP 10
           a.ProductKey, SUM(a.SalesAmount) AS TotalSalesAmount
                 d             ( l        )        l l
        FROM (
           SELECT
              x.productkey, x.salesamount
           FROM dbo.FactInternetSales x
           INNER JOIN dbo.DimDate y
              ON x.OrderDateKey=y.DateKey
           WHERE y.CalendarYear=2003
           UNION ALL
           SELECT
              x.productkey, x.salesamount
Lessons Learned
         L       L     d
        Clearly d fi
        Cl l define audience
                         di
Align technology with audience
       Actively engage audience
Thank You!
brysmi@microsoft.com

More Related Content

Viewers also liked

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
 
Citrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature BriefCitrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature Brief
Nuno Alves
 
Introduction to mdx query ppt
Introduction to mdx query pptIntroduction to mdx query ppt
Introduction to mdx query ppt
Shankar Murugappan
 
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
Hong-Bing Li
 
Mdx complex-queries-130019
Mdx complex-queries-130019Mdx complex-queries-130019
Mdx complex-queries-130019
Sabyasachi Srimany
 
SQL Server Analysis Services and MDX
SQL Server Analysis Services and MDXSQL Server Analysis Services and MDX
SQL Server Analysis Services and MDX
Mark Ginnebaugh
 
Mdx university dubai courses
Mdx university dubai coursesMdx university dubai courses
Mdx university dubai courses
anjam tm
 
Multidimensional expressions mdx - reference
Multidimensional expressions   mdx - referenceMultidimensional expressions   mdx - reference
Multidimensional expressions mdx - reference
Steve Xu
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
Doug Armantrout
 
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
DCH Acura of Temecula
 
IBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding TechniquesIBM Cognos Dimensional Dashboarding Techniques
IBM Cognos Dimensional Dashboarding Techniques
Senturus
 
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
Miami-Dade Transportation Planning Organization
 
rmoore.smartquery KScope15
rmoore.smartquery KScope15rmoore.smartquery KScope15
rmoore.smartquery KScope15
Ron Moore
 
Moore Advanced Calculations in Calc Manager OW 20151015
Moore Advanced Calculations in Calc Manager  OW 20151015Moore Advanced Calculations in Calc Manager  OW 20151015
Moore Advanced Calculations in Calc Manager OW 20151015
Ron Moore
 
MDX (Multi Dimensional Expressions) Introduction
MDX (Multi Dimensional Expressions) IntroductionMDX (Multi Dimensional Expressions) Introduction
MDX (Multi Dimensional Expressions) Introduction
Digvendra Singh
 
Ssis sql ssrs_ssas_sp_mdx_hb_li
Ssis sql ssrs_ssas_sp_mdx_hb_liSsis sql ssrs_ssas_sp_mdx_hb_li
Ssis sql ssrs_ssas_sp_mdx_hb_li
Hong-Bing Li
 
SSRS for DBA's
SSRS for DBA'sSSRS for DBA's
SSRS for DBA's
Jonathan Bloom
 
Big Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache KylinBig Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache Kylin
inovex GmbH
 
Essbase Calculations A Visual Approach KScope 2010
Essbase Calculations A Visual Approach KScope 2010Essbase Calculations A Visual Approach KScope 2010
Essbase Calculations A Visual Approach KScope 2010
Ron Moore
 
SSAS and MDX
SSAS and MDXSSAS and MDX
SSAS and MDX
carmenfaber
 

Viewers also liked (20)

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)
 
Citrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature BriefCitrix MDX Technologies Feature Brief
Citrix MDX Technologies Feature Brief
 
Introduction to mdx query ppt
Introduction to mdx query pptIntroduction to mdx query ppt
Introduction to mdx query ppt
 
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
 
SQL Server Analysis Services and MDX
SQL Server Analysis Services and MDXSQL Server Analysis Services and MDX
SQL Server Analysis Services and MDX
 
Mdx university dubai courses
Mdx university dubai coursesMdx university dubai courses
Mdx university dubai courses
 
Multidimensional expressions mdx - reference
Multidimensional expressions   mdx - referenceMultidimensional expressions   mdx - reference
Multidimensional expressions mdx - reference
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 
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
 
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
 
rmoore.smartquery KScope15
rmoore.smartquery KScope15rmoore.smartquery KScope15
rmoore.smartquery KScope15
 
Moore Advanced Calculations in Calc Manager OW 20151015
Moore Advanced Calculations in Calc Manager  OW 20151015Moore Advanced Calculations in Calc Manager  OW 20151015
Moore Advanced Calculations in Calc Manager OW 20151015
 
MDX (Multi Dimensional Expressions) Introduction
MDX (Multi Dimensional Expressions) IntroductionMDX (Multi Dimensional Expressions) Introduction
MDX (Multi Dimensional Expressions) Introduction
 
Ssis sql ssrs_ssas_sp_mdx_hb_li
Ssis sql ssrs_ssas_sp_mdx_hb_liSsis sql ssrs_ssas_sp_mdx_hb_li
Ssis sql ssrs_ssas_sp_mdx_hb_li
 
SSRS for DBA's
SSRS for DBA'sSSRS for DBA's
SSRS for DBA's
 
Big Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache KylinBig Data MDX with Mondrian and Apache Kylin
Big Data MDX with Mondrian and Apache Kylin
 
Essbase Calculations A Visual Approach KScope 2010
Essbase Calculations A Visual Approach KScope 2010Essbase Calculations A Visual Approach KScope 2010
Essbase Calculations A Visual Approach KScope 2010
 
SSAS and MDX
SSAS and MDXSSAS and MDX
SSAS and MDX
 

More from DATAVERSITY

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
DATAVERSITY
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and Governance
DATAVERSITY
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data Literacy
DATAVERSITY
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business Goals
DATAVERSITY
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for You
DATAVERSITY
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?
DATAVERSITY
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?
DATAVERSITY
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling Fundamentals
DATAVERSITY
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic Project
DATAVERSITY
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at Scale
DATAVERSITY
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?
DATAVERSITY
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
DATAVERSITY
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?
DATAVERSITY
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and Forwards
DATAVERSITY
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement Today
DATAVERSITY
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics
DATAVERSITY
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best Practices
DATAVERSITY
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?
DATAVERSITY
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best Practices
DATAVERSITY
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive Advantage
DATAVERSITY
 

More from DATAVERSITY (20)

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and Governance
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data Literacy
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business Goals
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for You
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling Fundamentals
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic Project
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at Scale
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and Forwards
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement Today
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best Practices
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best Practices
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive Advantage
 

Recently uploaded

Guidelines for Effective Data Visualization
Guidelines for Effective Data VisualizationGuidelines for Effective Data Visualization
Guidelines for Effective Data Visualization
UmmeSalmaM1
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
UiPathCommunity
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
Safe Software
 
From NCSA to the National Research Platform
From NCSA to the National Research PlatformFrom NCSA to the National Research Platform
From NCSA to the National Research Platform
Larry Smarr
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
ScyllaDB
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDCScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
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
 
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
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
Tracking Millions of Heartbeats on Zee's OTT Platform
Tracking Millions of Heartbeats on Zee's OTT PlatformTracking Millions of Heartbeats on Zee's OTT Platform
Tracking Millions of Heartbeats on Zee's OTT Platform
ScyllaDB
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
ScyllaDB
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
ThousandEyes
 

Recently uploaded (20)

Guidelines for Effective Data Visualization
Guidelines for Effective Data VisualizationGuidelines for Effective Data Visualization
Guidelines for Effective Data Visualization
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
 
From NCSA to the National Research Platform
From NCSA to the National Research PlatformFrom NCSA to the National Research Platform
From NCSA to the National Research Platform
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to SuccessMongoDB to ScyllaDB: Technical Comparison and the Path to Success
MongoDB to ScyllaDB: Technical Comparison and the Path to Success
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
ScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDCScyllaDB Real-Time Event Processing with CDC
ScyllaDB Real-Time Event Processing with CDC
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
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
 
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...
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
Tracking Millions of Heartbeats on Zee's OTT Platform
Tracking Millions of Heartbeats on Zee's OTT PlatformTracking Millions of Heartbeats on Zee's OTT Platform
Tracking Millions of Heartbeats on Zee's OTT Platform
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
 

Unlocking the Mystery of MDX

  • 1. Unlocking the Mystery of MDX Bryan Smith brysmi@microsoft.com
  • 2.
  • 3. Objectives Obj ti Explain h d behind E l i the modell b hi d MDX Explore lessons learned
  • 4. The i Th views and opinions expressed in this .... d ii d i thi
  • 5. (3) x -4 -3 -2 -1 0 1 2 3 4
  • 6. y 4 (3, 2) 3 2 1 x -4 -3 -2 -1 1 2 3 4 -2 -3 -4
  • 7. y 4 (3, 2, 4) 3 2 1 x -4 -3 -2 -1 1 2 3 4 -2 z -3 -4
  • 8. one-dimensional (x) single two-dimensional (x, y) double three-dimensionall h di i (x, ) ( y, z) triple il (a1, a2, a3, a4) four-dimensional (x, y, z, ?) quadruple
  • 9. four-dimensional f di i l (a ( 1 , a2 , a3 , a4 ) quadruple d l five-dimensional (a1, a2, a3, a4, a5) quintuple six-dimensional (a1, a2, a3, a4, a5, a6) sextuple seven-dimensional (a1, a2, a3, a4, a5, a6, a7) septuple eight dimensional eight-dimensional (a1, a2, a3, a4, a5, a6, a7, a8) octuple
  • 10. four-dimensional four dimensional (a1, a2, a3, a4) quadruple five-dimensional (a1, a2, a3, a4, a5) quintuple six-dimensional (a1, a2, a3, a4, a5, a6) sextuple seven-dimensional (a1, a2, a3, a4, a5, a6, a7) septuple eight dimensional eight-dimensional (a1, a2, a3, a4, a5, a6, a7, a8) octuple n-dimensional (a1, a2, … an) tuple
  • 11. My Simple Cube Measure Group Σ Measure Dimension Attribute
  • 12. My Simple Cube Reseller Sales Internet Sales 6 Σ Reseller Sales Amount Σ Internet Sales Amount Date Product Geography 1 Fiscal Year 3 Category 5 Country 2 Calendar Year 4 Subcategory
  • 13. Product P d t Category All Products Accessories Bikes Clothing Components
  • 14. Components C ([Bikes]) Clo othing Bike es Accessories A Alll Products Category [Product].[Category] P d t Product
  • 15. ( ( a1, [CY 2002], [Date].[Calendar Year].[CY 2002], [All Periods], a2, [Date].[Fiscal Year].[All Periods], [Bikes], a3, [Product].[Category].[Bikes], [All Products], a4, [Product].[Subcategory].[All Products], [All Geographies], a5, [Geography].[Country].[All Geographies], [Reseller Sales Amount] a6 [Measures].[Reseller Sales Amount] ) ) ( [Geography].[Country].[All Geographies], [Product].[Category].[Bikes], [Measures].[Reseller Sales Amount], [ ][ [Date].[Fiscal Year].[All Periods], ][ ] [Product].[Subcategory].[All Products], [Date].[Calendar Year].[CY 2002] )
  • 16. ( ( [Date].[Calendar Year].[CY 2002], [Date].[Calendar Y ] [CY [D ] [C l d Year].[CY 2002], ] [ ][ [Date].[Fiscal Year].[All Periods], ][ ], [Product].[Category].[Bikes] [Product].[Category].[Bikes] ) [Product].[Subcategory].[All Products], [Geography].[Country].[All Geographies], [Measures].[Reseller Sales Amount] ) Attributes Partial Rule 1 Rule 2 Rule 3 Completed Tuple Default Member (All) Member First Member Tuple Date.Calendar Year CY 2002 CY 2002 Date.Fiscal Year All Periods All Periods Product.Category Bikes Bikes Product.Subcategory All Products All Products Geography.Country All Geographies All Geographies Measures Reseller Sales Amount Reseller Sales Amount
  • 17. SELECT [Date].[Calendar Year].Members ON COLUMNS, [Product].[Category].Members ON ROWS FROM [My Simple Cube] All Periods CY 2001 CY 2002 CY 2003 CY 2004 All Products $80,450,597 $8,065,435 $24,144,430 $32,202,669 $16,038,063 Accessories $571,298 $20,235 $92,735 $296,533 $161,794 Bikes $66,302,382 $7,395,349 $19,956,015 $25,551,775 $13,399,243 Clothing $1,777,840 $34,376 $485,587 $871,864 $386,013 Components $11,799,077 $34,376 $3,610,092 $5,482,497 $2,091,012
  • 18. MDX SELECT [Date].[Calendar Y ] M b [D ] [C l d Year].Members ON COLUMNS, COLUMNS [Product].[Category].Members ON ROWS FROM [My Simple Cube] SQL SELECT e.CalendarYear, d.EnglishProductCategoryName, SUM(a.SalesAmount) FROM FactResellerSales a INNER JOIN DimProduct b ON a.ProductKey=b.ProductKey d b d INNER JOIN DimProductSubcategory c ON b.ProductSubcategoryKey=c.ProductSubcategoryKey INNER JOIN DimProductCategory d ON c.ProductCategoryKey=d.ProductCategoryKey INNER JOIN DimDate e ON a.OrderDateKey=e.DateKey GROUP BY e.CalendarYear, d.EnglishProductCategoryName
  • 19. MDX WITH MEMBER [Measures].[Total Sales Amount] AS [Measures].[Internet Sales Amount] + [Measures].[Reseller Sales Amount] [M ] [I Sl A ] [M ] [R ll S l A ] SET [Top 10 Products of 2003] AS TOPCOUNT( [Product].[Product].[Product].Members, 10, ([Measures].[Total Sales Amount], [Date].[Calendar Year].[CY 2003]) ) SELECT [Measures].[Total Sales Amount] ON COLUMNS, [Top 10 Products of 2003] ON ROWS FROM [Step-by-Step] WHERE ([Date].[Calendar Year].[CY 2004]) SQL SELECT m.EnglishProductName, o.TotalSalesAmount FROM dbo.DimProduct m INNER JOIN ( -- TOP 10 PRODUCTS OF 2003 SELECT TOP 10 a.ProductKey, SUM(a.SalesAmount) AS TotalSalesAmount d ( l ) l l FROM ( SELECT x.productkey, x.salesamount FROM dbo.FactInternetSales x INNER JOIN dbo.DimDate y ON x.OrderDateKey=y.DateKey WHERE y.CalendarYear=2003 UNION ALL SELECT x.productkey, x.salesamount
  • 20.
  • 21.
  • 22. Lessons Learned L L d Clearly d fi Cl l define audience di Align technology with audience Actively engage audience
  翻译: