Search code examples
ssasmdx

Reading Data from different dimension when creating MDX queries in SSAS


I am trying to create a query but it utilizes two different dimensions. I receive this error "Members, tuples, or sets must use the same hierarchies in the function." I've run this with/without the brackets in the row section and got the same error. How do I resolve this issue? Error Message/MDX Query


Solution

  • You are using two different hierarchies of the same dimension [Dim Course] in the tuple which is not allowed.

    You will have to change your query, something like this should work:

    select {[Measures].[Dim Course Count],[Measures].[Dim Semester Count]} on 0,
    {([Dim Course].[Course Code].[Course Code], [Dim Semester].[Academic Year].[Academic Year]) } on 1
    from [CCSE-DM]
    where [Dim Course].[Level1].[Level1]