Database Reference
In-Depth Information
One interesting pattern that happens to work is the use of the All level followed by a path of multiple
members. An example is shown in Listing 14-28.
Listing 14-28. An Exception to the Rule
-- This works!
Select
{ [Measures].[SalesQuantity]} On Columns,
{ −- Dim.Member.Member.Member (and not Dim.Level.Member.Member)
[DimTitles].[All].[New Moon Books].[Is Anger the Enemy?]
-- Works because [All] is both a member and a level.
} On Rows
From [CubePubsSales];
What makes this last example seem so odd is that the All level is both a level and a member, so it looks like
you are getting away with using an incorrect path of Dimension. < Skipped hierarchy > .Level.Member.Member,
when you are actually using Dimension.Member.Member.Member . Isn't MDX fun?!
Common Functions
Like any programming language, MDX has a number of useful functions. Let's take a look at some of the ones
you are likely to encounter.
in Microsoft's MDX documentation, what other programming languages refer to as methods, properties, or
operators are all called functions . Consider these terms interchangeable here.
Tip
PrevMember and NextMember Functions
These two functions return the previous or next member from the same level. For example, the three MDX
examples in Listing 14-29 all return the same results, as shown in Figure 14-22 .
 
 
Search WWH ::




Custom Search