Navigating dimension hierarchies
Earlier in this chapter you learned how to use the CurrentMember
function to retrieve the name of the current hierarchy member. MDX allows browsing hierarchies easily using similar functions, PrevMember
and NextMember
, which are extremely useful for trend analysis. Additionally, you can obtain hierarchy members using relative functions, such as children, ancestors, descendants, and parent, to build sets based on the members of interest. This section will list examples where these functions are particularly beneficial.
How to do it...
Let's get started with navigating dimension hierarchies.
- To implement the
[Year-over-Year Growth in Reseller Sales Amount]
calculated measure, open the sample Adventure Works 2012 database ...
Get SQL Server Analysis Services 2012 Cube Development Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.