Results 1 to 5 of 5

Thread: MDX Sample Query CrossJoin

  1. #1
    Join Date
    May 2007
    Posts
    6

    MDX Sample Query CrossJoin

    I was reading the MDX Essentials tutorial on CrossJoin. The author showed the following crossjoin example:
    http://www.databasejournal.com/img/DJ_MDX18-002.jpg

    Can anyone tell me how I would instead do the following?

    Code:
    	CA	OR	WA
    Q1	9,616	14,890	20,557
    Q2	13,107	16,462	20,931
    Q3	16,052	16,404	14,984
    Q4	17,351	11,222	26,919
    The numbers represent the Units Shipped (same as example) but the rows show the quarters and the columns show the states.
    Attached Images Attached Images

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

    This Sample MDX Query Meets the Need ...

    Hi:

    Try this:

    -- Example Angela Query

    SELECT

    CROSSJOIN(

    {[Warehouse].[Country].[USA].Children},

    {[Measures].[Units Shipped]})

    ON COLUMNS,

    {[Time].[Year].[1998].Children}

    ON ROWS

    FROM

    [Warehouse]


    Again, from the FoodMart 2000 AS DB.

    Let us know how it goes ...

    Bill

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

    Did that do it for you?

    Just wondering if I understood the requirement ...

    Bill

  4. #4
    Join Date
    May 2007
    Posts
    6
    That worked great, thanks Bill.

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

    Glad to Be of Help!

    Be sure to let us know how things are going - and if you need further help within the integrated MS BI solution.

    Bill

Posting Permissions

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