MDX Member Functions: The "Family" Functions - Page 2March 24, 2003 Introduction to the "Family" Member FunctionsIn the first lesson of the Member Functions segment of our series, we will take some time to "get to know the family." I like to call one specific subset of the member functions and operators the "family" functions, because many of their names resemble those of family members. The functions that compose this group include:
The "family" metaphor is appropriate, because these functions perform operations on dimensions, hierarchies, and levels in a manner that mirrors movement about a "family tree." There are other "family" functions that return sets, but we will focus primarily on the member functions in this segment of the series. We will discuss some of the concepts that underlie the "family" functions, and discuss the appropriate syntax involved in using each effectively. Next, we will provide hands-on exposure to the use of each in simple expressions / queries that we will subsequently run to view the output and reinforce our understanding of the function / component from the perspective of the result dataset that it returns. This lesson will include:
As we mentioned in Lesson 4, member functions, particularly those of the "family" group, allow us to perform operations based upon a member's relative position, either up ("above" the member upon which the function is being performed) or down ("below" the member upon which the function is being performed) a dimensional hierarchy. A zero is returned if we attempt to go beyond the boundaries of a defined hierarchy an example of this might be trying to apply the .Children function to a member at the bottom / leaf level of the hierarchy (which is childless, in this context). Like most member functions, the "family" functions can be quite valuable in helping us to simplify our MDX queries and make them more compact. |