Joining two queries in MDX

  • I have two queries that has been implemented in MDX for different dates:

    SELECT NON EMPTY { [Measures].[Quantity Received] } ON COLUMNS,

    non empty {([Customer - ID].[Customer - ID],[Entry Date Time].[01/01/2008])} ON ROWS

    FROM [Sales]

    SELECT NON EMPTY { [Measures].[Quantity Received] } ON COLUMNS,

    non empty {([Customer - ID].[Customer - ID],[Entry Date Time].[01/02/2008])} ON ROWS

    FROM [Sales]

    The only difference of these two queries is on their Entry Date Time

    Now I want to join these table so I will have result like this

    CustomerID EntryDateTime QuantityRecieved EntryDateTime QuantityRecieved

    12 01/01/2008 12 01/02/2008 13

    Is this doable and also can I chnage the caption of the column on the result Set.Because now I have duplicate EntryDateTime,QuantityRecieved.

    Thanks

  • I'm trying to do pretty much the exact same thing.

    You could create calculated members for each of the [date/time],[Measure] combinations and return them all, but I'm trying to avoid doing that.

    I'll post back if I find anything.

    SQL SERVER Central Forum Etiquette[/url]

  • I don't understand why you'd need to join two MDX queries together. In the above example wouldn't you just have a set with the multiple dates you want to select.

    Like

    SELECT NON EMPTY { [Measures].[Quantity Received] } ON COLUMNS,

    non empty {[Customer - ID].[Customer - ID].[All].Children}

    * {[Entry Date Time].[01/01/2008],[Entry Date Time].[01/02/2008]} ON ROWS

    FROM [Sales]

    Am I missing something?

    Mack

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

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