MDX QUERY

  • I am trying to write a query in MDXwhere i have to combine results of 2 MDX query into one

    query goes like this

    With Measure Measures.A as '.....'

    select Measure.A on columns,

    dimension.DIM_1 on rows

    from MYCUBE

    With Measure Measures.A as '.....'

    select Measure.A on columns,

    dimension.DIM_2 on rows

    from MYCUBE

    is there any way to combine the result of these 2 queries in to one

    i tried using UNION but in tht it requires same dimesnion in both the queries (if m not wrong)

    plz help me out in this

  • Not 100% sure from your example of exactly what you are needing but one possible answer is

    With Member Measures.A as '.....'

    select Measure.A on columns,

    (dimension.DIM_1, dimension.DIM_2) on rows

    from MYCUBE

  • Wel these are my two queries where dimensions in the row axis are different rest is same

    WITH

    MEMBER [Measures].[v1] AS '( -1 * [Measures].[Value] )/1000'

    SELECT

    ([Measures].[v1]) ON COLUMNS,

    NONEMPTY([Product].[Prod_L03_Business_Unit_PNL_Items].MEMBERS)DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

    FROM [COI Reporting]

    WHERE

    ([Scenario].[Scenario].&[ACTUALS]

    ,[Time].[Month].&[772008054]

    ,[COI Flag].[Name].&[COI]

    ,[Account].[Acct_L03_Group_Name_PNL_Items].&[AGR]

    )

    WITH

    MEMBER [Measures].[v1] AS '( -1 * [Measures].[Value] )/1000'

    SELECT

    ( [Measures].[v1]) ON COLUMNS,

    NONEMPTY([DataSource].[DataSource].MEMBERS) DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

    FROM [COI Reporting]

    WHERE

    ([Scenario].[Scenario].&[ACTUALS]

    ,[Time].[Month].&[772008054]

    ,[COI Flag].[Name].&[COI]

    ,[Account].[Acct_L03_Group_Name_PNL_Items].&[AGR]

    )

    dont want any cross joins... just want to club the results of both the query one below the other

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply