Search code examples
ssasmdxolap

Set requirement on the axis


In MDX, I've read that the SELECT clause selects sets on up to N axes. What about the following queries then that still work?

SELECT
    [Measures].[Count] -- no set specified here?
FROM
    [Mycube]

Or:

SELECT
    [Measures].[Count],
    (Conference.Conference.members, Division.Division.members) -- a tuple?
FROM
    [Mycube]

Why are both of the above 'ok' then?


Solution

  • Your query will work since for column axis you just have a single member, here MDX will translate it to a set automatically. But If you add a dimension member to it then you will first have to enclose it with "()" to indicate that it is a tuple. OR If you add two Measures in the above query you will have to enclose them in "{}".

    You may also want to read this.

    How to display multiple dimensions on rows in MDX query?