Search code examples
ssasmdx

MDX query on a single dimension


Can someone please remind me how I do this?

I want an MDX query (MS SSAS) which will query a dimension. Not interested in cubes or measures.

So far as I remember the syntax involves a $ sign, something like [$MyDimension].

I know I can do the below, but I want to query the dimension without touching a cube.

select [DimensionName].Children on 0 from [CubeName]

Solution

  • I guess they're called "dimension cube":

    select [dim].members on 0 from [$dim]
    

    or

    select [Measures].defaultMember on 0, [dim].members on 1 from [$dim]