Book description
Serving as both a tutorial and a reference guide to the MDX (Multidimensional Expressions) query language, this book shows data warehouse developers what they need to know to build effective multidimensional data warehouses
After a brief overview of the MDX language and a look at how it is used to access data in sophisticated, multidimensional databases and data warehousing, the authors move directly to providing practical examples of MDX in use
New material covers changes in the MDX language itself as well as major changes in its implementation with the latest software releases of Microsoft SQL Server Analysis Services 2005 and Hyperion Essbase
Also covers more advanced techniques, like aggregation, query templates, and MDX optimization, and shows users what they need to know to access and analyze data to make better business decisions
Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.
Table of contents
- Copyright
- About the Authors
- Credits
- Acknowledgments
- Introduction
-
1. A First Introduction to MDX
- 1.1. What Is MDX?
- 1.2. Query Basics
- 1.3. Axis Framework: Names and Numbering
- 1.4. Case Sensitivity and Layout
- 1.5. Simple MDX Construction
- 1.6. Removing Empty Slices from Query Results
- 1.7. Comments in MDX
- 1.8. The MDX Data Model: Tuples and Sets
- 1.9. More Basic Vocabulary
- 1.10. Querying for Member Properties
- 1.11. Querying Cell Properties
- 1.12. Client Result Data Layout
- 1.13. Summary
-
2. Introduction to MDX Calculated Members and Named Sets
- 2.1. Dimensional Calculations As Calculated Members
- 2.2. Calculated Member Scopes
-
2.3. Basic Calculation Functions
- 2.3.1. Arithmetic Operators
- 2.3.2. Summary Statistical Operators
- 2.3.3. Avg()
- 2.3.4. Count(), .Count
- 2.3.5. DistinctCount() (Microsoft extension)
- 2.3.6. Sum()
- 2.3.7. Max()
- 2.3.8. Median()
- 2.3.9. Min()
- 2.3.10. NonEmptyCount() (Hyperion extension)
- 2.3.11. Stdev(), Stddev()
- 2.3.12. StdevP(), StddevP() (Microsoft Extension)
- 2.3.13. Var(), Variance()
- 2.3.14. VarP(), VarianceP() (Microsoft Extension)
- 2.4. Additional Functions
- 2.5. Introduction to Named Sets
- 2.6. Summary
-
3. Common Calculations and Selections in MDX
-
3.1.
- 3.1.1. Metadata Referencing Functions in MDX
- 3.1.2. Many Kinds of Ratios, Averages, Percentages, and Allocations
-
3.1.3. Percent Contribution (Simple Ratios between Levels in a Hierarchy)
- 3.1.3.1. Percent Contribution to Total
- 3.1.3.2. Using the .CurrentMember function
- 3.1.3.3. Using the .Parent function
- 3.1.3.4. Taking the Share-of-Parent Using .CurrentMember and .Parent
- 3.1.3.5. Using the Ancestor() function
- 3.1.3.6. Calculating the Share-of-Ancestor using .CurrentMember and Ancestor()
- 3.1.3.7. Handling Division by Zero
- 3.1.4. Basic Allocations
- 3.1.5. Averages
- 3.2. Time-Based References and Time-Series Calculations
- 3.3. Using LastPeriods() to Select Time Ranges Based on a Target Member
-
3.4. Different Aggregations along Different Dimensions (Semi-Additive Measures Using MDX)
- 3.4.1. Mixing Aggregations: Sum across Non-Time, Average/Min/Max along Time
- 3.4.2. Mixing Aggregations: Sum across Non-time, Opening/Closing Balance along Time
- 3.4.3. Carryover of Balances for Slowly Changing Values and Reporting of Last Entered Balance
- 3.4.4. Finding the Last Time Member for Which Any Data Has Been Entered
- 3.5. Using Member Properties in MDX Expressions (Calculations and Sorting)
- 3.6. Handling Boundary Conditions (Members out of Range, Division by Zero, and More)
- 3.7. Summary
-
3.1.
-
4. MDX Query Context and Execution
-
4.1. Cell Context and Resolution Order in Queries
- 4.1.1. The Execution Stages of a Query
- 4.1.2. Cell Evaluation (For Any Cell)
- 4.1.3. Resolving NON EMPTY Axes
- 4.1.4. Resolving the HAVING Clause in AS2005
- 4.1.5. Looping Context and .CurrentMember
- 4.1.6. Interdependence of Members in AS2005: Strong Hierarchies, Autoexists, and Attribute Relationships
- 4.2. Modifying the Cube Context in AS2005
- 4.3. Nondata: Invalid Numbers, NULLs, and Invalid Members
- 4.4. Precedence of Cell Properties in Calculations
- 4.5. Cube Context in Actions
- 4.6. Cube Context in KPIs
- 4.7. Visibility of Definitions between Global, Session, and Query-Specific Calculations in Analysis Services 2005
- 4.8. Summary
-
4.1. Cell Context and Resolution Order in Queries
- 5. Named Sets and Set Aliases
- 6. Sorting and Ranking in MDX
-
7. Advanced MDX Application Topics
- 7.1. Arranging Parents/Ancestors after Children, Not Before
- 7.2. Returning the Subtree under a Member and the Ancestors of That Member Along with the Member
- 7.3. Using Generate() to Turn Tuple Operations into Set Operations
- 7.4. Calculating Dates/Date Arithmetic
- 7.5. Defining Ratios against the Members Selected on Rows/Columns/Axes, Instead of against a Specific Dimension
- 7.6. Report-Based Totals-to-Parent, Percentage Contribution to Report Totals
- 7.7. Hierarchical Sorting That Skips Levels in the Hierarchy
- 7.8. Sorting a Single Set on Multiple Criteria
- 7.9. Multiple Layers or Dimensions of Sorting
- 7.10. Pareto Analysis and Cumulative Sums
- 7.11. Returning the Top-Selling Product (or Top-Selling Month or Other Most-Significant Name) As a Measure
- 7.12. Most Recent Event for a Set of Selected Members
- 7.13. How Long Did It Take to Accumulate This Many? (Building a Set That Sums Backward or Forward in Time)
- 7.14. Aggregating by Multiplication (Product Instead of Sum)
- 7.15. Including All Tuples with Tied Ranking in Sets
- 7.16. Time Analysis Utility Dimensions
- 7.17. A Sample Analysis
- 7.18. Summary
- 8. Using the Attribute Data Model of Microsoft Analysis Services
- 9. Using Attribute Dimensions and Member Properties in Hyperion Essbase
-
10. Extending MDX through External Functions
- 10.1. Using Stored Procedures with MDX
- 10.2. ADOMD Server objects
- 10.3. AMO .NET Management Stored Procedures
- 10.4. Performance Considerations of Static Functions and Nonstatic Functions
- 10.5. Argument and Return-Type Details
- 10.6. MDX Functions for Use with COM Stored Procedures
- 10.7. External Function Example: Time Span until Sum
- 10.8. Loading and Using Stored Procedures
- 10.9. Stored Procedure Name Resolution
- 10.10. Invoke Stored Procedures in MDX
- 10.11. Additional Considerations for Stored Procedures
- 10.12. Summary
- 11. Changing the Cube and Dimension Environment through MDX
-
12. The Many Ways to Calculate in Microsoft Analysis Services
- 12.1. Overview of Calculation Mechanisms
- 12.2. How Types of Calculations Interact
- 12.3. Tips on Using the Different Calculation Techniques
- 12.4. Summary
- 13. MDX Scripting in Analysis Services 2005
- 14. Enriching the Client Interaction
-
15. Client Programming Basics
- 15.1. ADOMD.NET Basics
- 15.2. Working with Metadata
- 15.3. Executing a Query
- 15.4. Executing Actions
- 15.5. Handling "Flattened" MDX Results
- 15.6. Summary
-
16. Optimizing MDX
- 16.1. Architecture Change from Analysis Services 2000 to 2005
- 16.2. Optimizing Set Operations
- 16.3. Optimizing Summation
- 16.4. Designing Calculations into Your Database (Putting Member Properties into Measures and the New MDX function MemberValue)
-
16.5. MDX Script Optimization
- 16.5.1. Scope the Calculation in Detail
- 16.5.2. Avoid Leaf-Level Calculations
- 16.5.3. Cube Design to Avoid Leaf-Level Calculation
- 16.5.4. Measure Expression to Optimize Leaf-Level Calculation
- 16.5.5. MDX Script Optimization for Leaf-Level Calculation
- 16.5.6. Analysis Service 2005: Use Attribute Hierarchy Instead of Member Property
- 16.5.7. Analysis Service 2005: Use Scope Instead of IIF
- 16.5.8. Avoid Slow Functions in MDX Scripts
- 16.5.9. Change the Calculation Logic for Better Performance: Flow Calculation
- 16.5.10. Use Server Native Features Rather Than Scripts for Aggregation-Related Calculations
- 16.6. Summary
-
17. Working with Local Cubes
- 17.1. Choosing Which Syntax to Use
-
17.2. Using the CREATE CUBE Statement
- 17.2.1. Overview of the Process
- 17.2.2. Anatomy of the CREATE CUBE Statement
- 17.2.3. Defining Dimensions
- 17.2.4. Defining Measures
- 17.2.5. Adding Commands
- 17.2.6. ROLAP versus MOLAP
- 17.2.7. Anatomy of the INSERT INTO Statement
- 17.2.8. Cube Targets
- 17.2.9. Options for the INSERT INTO
- 17.2.10. The SELECT Clause
- 17.2.11. Tips for Construction
- 17.2.12. Local Cubes from Server Cubes
- 17.2.13. Rollups and Custom Member Formulas
- 17.3. Using the CREATE GLOBAL CUBE Statement
- 17.4. Using Analysis Services Scripting Language
- 17.5. Summary
-
A. MDX Function and Operator Reference
- A.1. Index to Functions
- A.2. Basic Operators
- A.3. Standard MDX Operators Not Supported by Microsoft Analysis Services
- A.4. Function and Operator Reference
-
B. Connection Parameters That Affect MDX
- B.1. Auto Synch Period
- B.2. Cache Policy
- B.3. Cache Ratio
- B.4. Cache Ratio2
- B.5. CompareCaseNotSensitiveStringFlags
- B.6. CompareCaseSensitiveStringFlags
- B.7. CreateCube
- B.8. Cube
- B.9. CustomData
- B.10. Data Source
- B.11. Default MDX Visual Mode
- B.12. Execution Location
- B.13. Initial Catalog
- B.14. InsertInto
- B.15. Large Level Threshold
- B.16. Locale Identifier
- B.17. Log File
- B.18. MDX Compatibility
- B.19. MDX Missing Member Mode
- B.20. MDX Unique Name Style
- B.21. Non Empty Threshold
- B.22. Real Time OLAP
- B.23. Restricted Client
- B.24. Roles
- B.25. Safety Options
- B.26. Secured Cell Value
- B.27. Source_DSN
- B.28. Source_DSN_Suffix
- B.29. UseExistingFile
- C. Intrinsic Cell and Member Properties
- D. Format String Codes
Product information
- Title: MDX Solutions: With Microsoft® SQL Server™ Analysis Services 2005 and Hyperion® Essbase, Second Edition
- Author(s):
- Release date: March 2006
- Publisher(s): Wiley
- ISBN: 9780471748083
You might also like
book
Professional SQL Server™ Analysis Services 2005 with MDX
Written by the lead developers of Analysis Services at Microsoft, this book begins with an overview …
book
Professional Microsoft® SQL Server® Analysis Services 2008 with MDX
When used with the MDX query language, SQL Server Analysis Services allows developers to build full-scale …
book
Microsoft® SQL Server® 2008 MDX Step by Step
Teach yourself the Multidimensional Expressions (MDX) query language—one step at a time. With this practical, learn-by-doing …
book
Microsoft® SQL Server™ 2008 Analysis Services Unleashed
As the foundation of the Microsoft Business Intelligence Strategy, Microsoft SQL Server 2008 Analysis Services provides …