Chapter 72. Programming MDX Queries
IN THIS CHAPTER
Cube addressing basics
MDX
SELECTstatementsCommonly used MDX functions
MDX named sets and calculated members
Adding named sets, calculated members, and business intelligence to cube definitions
Multidimensional Expressions (MDX) is to Analysis Services what SQL is to the relational database, providing both definition (DDL) and query (DML) capabilities. MDX queries even look somewhat like SQL, but the ideas behind them are dramatically different. Certainly, MDX returns multidimensional cell sets instead of two-dimensional result sets, but more important, MDX does not contain a JOIN statement, as the cube contains explicit relationships between all the data it summarizes. Instead, hierarchically organized dimension data is manipulated in sets to determine both the content and structure of the result.
Learning to write basic MDX queries goes quickly for most people, especially those with other database experience. However, many beginners have a tendency to stall at the basic query level. This learning plateau seems to stem from a lack of understanding of only a dozen or so terms and concepts. These are the same concepts presented at the beginning of this chapter: tuples, sets, the parts of a dimension, and so on.
To avoid being stalled, attack MDX in manageable bites:
Read the "Basic Select Query" section following this list, and then practice basic queries until you become comfortable with them.
Return to and reread "Basic Select Query
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access