What this book covers
We added two new chapters to this edition of MDX cookbook: Chapter 6, MDX for Reporting, and Chapter 9, Metadata - Driven Calculations. We also decided to remove Chapter 8, Advanced MDX Topics due to many overlapping and redundant recipes.
To turn ad-hoc reports into parameterized reports is a challenging task. There are many special considerations associated with the dynamic nature of the reports with dynamic parameters. Through carefully thought-out examples, Chapter 6, MDX for Reporting, introduces new concepts in dynamic reporting, the challenges and the techniques for efficient report writing.
Once a cube is designed and implemented, adding more calculations is a common requirement. These calculations are defined not by the data of the cube, but by expressions that can reference other parts of the cube. MDX calculations that are metadata-driven let us extend the capabilities of a cube, adding flexibility and power to business intelligence solutions. It also comes with challenges, of having instead complex calculations. Chapter 9, Metadata-driven Calculations will cover techniques and best practices that have never been fully documented in any MDX books before.
Here's an overview of chapters and their contents.
Chapter 1, Elementary MDX Techniques, uses simple examples to demonstrate the fundamental MDX concepts, features, and techniques that are the foundations for our further explorations of the MDX language.
Chapter 2, Working with Sets, focuses on the challenges of performing logic operations, NOT, OR and AND, on manipulating sets in general.
Chapter 3, Working with Time, presents various time-related functions in MDX that are designed to work with a special type of dimension called Time and its typed attributes.
Chapter 4, Concise Reporting, focuses on techniques that you can employ in your project to make analytical reports more compact and more concise, and therefore, more efficient.
Chapter 5, Navigation , shows common tasks and techniques related to navigation and data retrieval relative to the current context.
Chapter 6, MDX for Reporting, covers common MDX reporting requirements and techniques using two approaches: parameterized MDX queries and dynamic MDX queries.
Chapter 7, Business Analytics, focuses on performing typical business analyses, such as forecasting, allocating values, and calculating the number of days from the last sales date.
Chapter 8, When MDX is Not Enough, teachers you that MDX calculations are not always the place to look for solutions. It illustrates several techniques to optimize the query response times with a relatively simple change in cube structure.
Chapter 9, Metadata-driven Calculations, explores the concept of storing and maintaining MDX calculations outside the cube by utilizing reporting dimension, custom aggregations, scopes and assignments.
Chapter 10, On the Edge, presents topics that will expand your horizons, such as clearing cache for performance tuning, executing MDX queries in T-SQL environment, using SSAS Dynamic Management Views (DMVs), drill-through, and capturing MDX queries using SQL Server Profiler.