Results 1 to 3 of 3

Thread: MDX Query - Two different time dimensions

  1. #1
    Join Date
    May 2007
    Posts
    6

    MDX Query - Two different time dimensions

    I have two queries that use two different Time dimensions (using FoodMart 2000):
    Code:
    WITH 
    MEMBER [Measures].[My Quarter Profits] as '[Measures].[Profit]'
    MEMBER [Measures].[My Annual Sales] as 'NULL'
    SELECT
    {[Measures].[My Quarter Profits],  [Measures].[My Annual Sales]} ON COLUMNS,
    {[Store].[All Stores].[USA].[CA].Children, [Store].[All Stores].[USA].[OR].Children, [Store].[All Stores].[USA].[WA].Children} ON ROWS
    FROM Sales
    WHERE [Time].[1997].[Q1]
    Code:
    WITH 
    MEMBER [Measures].[My Quarter Profits] as 'NULL'
    MEMBER [Measures].[My Annual Sales] as '[Measures].[Unit Sales]'
    SELECT
    {[Measures].[My Quarter Profits], [Measures].[My Annual Sales]} ON COLUMNS,
    Filter({[Store].[All Stores].[USA].[CA].Children, [Store].[All Stores].[USA].[OR].Children, [Store].[All Stores].[USA].[WA].Children}, [Measures].[My Annual Sales] > 25000) ON ROWS
    FROM Sales
    WHERE ([Time].[1997])
    Is there a way to write one single query that uses different Time dimensions for different sets (Year for one and Quarter for another)? I am looking for a single query that will return one table with the results of both queries above.

    Thank you.

  2. #2
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    How about via the Calculated members?

    Have you considered doing the differing time level specifications within the respective calculated members, and then simply pulling those members - without the time slicer in the primary query?

    HTH,

    B*

  3. #3
    Join Date
    May 2007
    Posts
    6
    Can you show me how to do that in code?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •