Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 MDX query help

Author  Topic 

rreyes
Starting Member

1 Post

Posted - 2008-10-30 : 12:02:31
Hello. Please help. I am new to MDX.

I can output the table below using

SELECT
NON EMPTY
{[Measures].[Cost of advertising],
{[Measures].[Quantity sold],
[Measures].[Revenue]
} ON COLUMNS,
NON EMPTY
{([Products].[Product name].[Product name].ALLMEMBERS *
[Customer Groups].[Group Name].[Group Name].ALLMEMBERS )
} ON ROWS
FROM [MySalesDW]

============================================================================
Product.............Bought.By........Cost.of.advertising.....Quantity.Sold.......Revenue
Hammer............Carpenters.........10.........................2.......................4
.....................Plumbers...........10.........................5.................,.....10
.....................Masons.............10.........................1.......................2
Screw.Driver......Carpenters.........8..........................3.......................9
.....................Plumbers...........8..........................5......................15
.....................Masons.............8..........................4......................12
Chisel..............Carpenters.........12.........................2.......................2
.....................Plumbers...........12.........................6......................6
.....................Masons.............12.........................2......................2
============================================================================

But I need an output like the table below. What query should I use? Please help. Many thanks.
==================================================================================
Product.................Cost of advertising..........Quantity sold on Carpenters.........Revenue on Plumbers
Hammer................10............................. 2........................................10
Screw Driver...........8...............................3........................................15
Chisel...................12............................. 2........................................6
==================================================================================

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-30 : 14:39:30
i dont think you need [Customer Groups].[Group Name].[Group Name].ALLMEMBERS in ROWS. remove it and try
Go to Top of Page
   

- Advertisement -