dbTalk Databases Forums  

Transpose a table

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Transpose a table in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Denver
 
Posts: n/a

Default Transpose a table - 04-26-2006 , 12:53 PM






I have a simple query

SELECT [Measure].[Measure 1], [Measure].[Measure 2] ON 0,
{[Brand].[Brand A], [Brand].[Brand B]} ON 1
FROM Cube

that outputs a table

BRAND - Measure 1 - Measure 2
Brand A - 100 - 200
Brand B - 50 - 150

But I want it to look like this

MEASURE - Brand A - Brand B
Measure 1 - 100 - 50
Measure 2 - 200 150

Any ideas how to do this?

Thanks

Denver


Reply With Quote
  #2  
Old   
Denver
 
Posts: n/a

Default Re: Transpose a table - 04-26-2006 , 02:04 PM






Sorry I am not being an idiot its to do with Reporting Services

This query works in the last version

SELECT ({[Brand].[Brands].[BrandFamily].&[89],
[Brand].[Brands].[BrandFamily].&[22]}) ON 0,
UNION([Measures].[Consider To Buy], [Measures].[Dislikes]) ON 1
FROM [Brand Equity Consumer]

But not in this version

Anyone know why and is there anyway around it?

Denver


Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Transpose a table - 04-26-2006 , 04:33 PM



Probably you're using the Analysis Services Provider, which only allows
measures on the columns of an MDX query. You can still use the original
OLE DB for OLAP Provider from RS 2000 days - this will allow measures on
rows, but doesn't directly support MDX parameters (you have to build the
query as an expression, like with RS 2000):

http://spaces.msn.com/cwebbbi/blog/cns!7B84B0F2C239489A!412.entry
Quote:
...
In RS2005 you are always forced to put the Measures dimension on the
columns axis in your queries if you're using a data source of type
'Microsoft SQL Server Analysis Services' (you can still get the glorious
AS/RS2K experience if you use an OLEDB connection instead along with the
AS OLEDB Provider).
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.