introduction to mdx dustin ryan. a little bit about me… business intelligence consultant,...

15
Introduction To MDX Dustin Ryan

Upload: drake-stander

Post on 15-Dec-2015

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Introduction To MDX

Dustin Ryan

Page 2: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

A little bit about me… Business Intelligence Consultant,

Pragmatic Works Technical editor for the many

authors at Pragmatic Works Blog/Write @ www.BIDN.com Proficient in magic Part-time belly dancer at I-4 truck

stop

Page 3: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

About Pragmatic Works… Located in sunny, stupid hot Green

Cove Springs, FL Offer consulting and training services

Data Warehousing Data Migrations DTS Conversions

Software centering around Microsoft B.I. stack BI xPress

BIDS plugin for SSIS development BI Documenter

Document reports, packages, cubes, databases

Task Factory High performance SSIS tasks

Page 4: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

What is MDX? Multi Dimensional eXpression

Language

Used to query cubes (multidimensional databases)

Developed during the late 1990’s

Page 5: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Where is MDX used? Cube calculations

KPI’s

Querying the cube

Page 6: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Why MDX? Allows complex reporting

Cube answers analytical questions

Data is pre-aggregated

DEMO

Page 7: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Useful Terminology Dimension

A Dimension organizes data in relation to a particular interest

Attribute Within a dimension are attributes. Attributes are

properties of the dimension that describe that area of interest.

Measures A measure can be summarized as a column that

contains some kind of quantifiable data that can be aggregated

Page 8: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

More Useful Terminology Hierarchy

A user defined hierarchy is a hierarchical structure of attributes

Page 9: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

A couple more terms… Level

Within a hierarchy are levels. An example of a level in the Date Hierarchy would be the Month Level.

Member A member is a value of a level. An example of a

member of the Month level would be March or April.

Page 10: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Yet More Useful Terms Axis

Can be thought of as the line on a which a single dimension rests which intersects our measure groups

An MDX query can have up to 128 axes (only 5 are aliased) Rows Columns Pages Chapters Sections

Most MDX queries contain only 2 axes since most reporting is done in a two dimensional tabular format

Page 11: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Basic MDX Query Syntax MDX Query example:

Select [Date].[Fiscal Year].members on Rows,

[Measures].[Internet Order Quantity] on Columns

From [Adventure Works]Where [Product].[Category].&[1]

DEMO

Page 12: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Tuples & Sets Tuples

A collection of dimension attributes not from the same dimension ex. ([Date].[Fiscal Year].members, [Sales Territory].[Sales Territory Country].members)

Set A collection of tuples

ex. {([Date].[Fiscal Year].&[2006], [Sales Reason].[Sales Reason].&[9]),([Date].[Fiscal Year].&[2006], [Sales Reason].[Sales Reason].&[5])}

DEMO

Page 13: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Common MDX Calculations DEMO

DEMO

Page 14: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

MDX Books to Check Out

MDX Solutions

Microsoft SQL Server 2008 MDX Step by Step

Practical MDX Queriesby Art Tennick

Page 15: Introduction To MDX Dustin Ryan. A little bit about me…  Business Intelligence Consultant, Pragmatic Works  Technical editor for the many authors at

Contact Me

Dustin Ryan Email:

[email protected]

Blog:

www.BIDN.com/blogs/DustinRyan