Search code examples
mdxolap

Why are there more then 2 axis possible in MDX and where can I use it?


I've been googling around to get this question answered. There is a max of 128 Axis you can use in MDX language, but I cannot find a single application that uses it nor a purpose of doing it.

There is this ADOMD.Net component i could use to write my own application that can work with it, but there is no single example i can find of why i should do it, and also no example of what people do with it in their applications.

Can someone please explain this to me ?


Solution

  • You can use as many axes as you like in a sub-select - it is very useful there for doing filtering.

    An example:

    SELECT 
      NON EMPTY 
        [Sales Territory].[Sales Territory].MEMBERS ON 0
     ,[Date].[Calendar].[Month].MEMBERS ON 1
    FROM 
    (
      SELECT 
        {
            [Date].[Calendar].[Month].&[2006]&[1]
          : 
            [Date].[Calendar].[Month].&[2006]&[8]
        } ON 0
       ,[Sales Territory].[Sales Territory].[Country].[Canada] ON 1
       ,[Product].[Product Categories].[Category].&[1] ON 2
      FROM [Adventure Works]
    )
    WHERE [Measures].[Internet Sales Amount];
    

    This returns the following:

    enter image description here


    Edit

    I suspect that the ability to use more than 2 axes had an element of future-proofing the language at the time it was created. So the authors were unsure how it would be used and thus built in this functionality.