dbTalk Databases Forums  

Cannot sort mdx resultset

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


Discuss Cannot sort mdx resultset in the microsoft.public.sqlserver.olap forum.



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

Default Cannot sort mdx resultset - 07-02-2006 , 09:41 AM






Dear all

I'm new to mdx and are struggeling in Reporting Services with the sort order
of a resultset. My querry is

WITH
MEMBER
[Measures].[ParameterCaption] AS
'[Lieferant].[Name].CURRENTMEMBER.MEMBER_CAPTION'


MEMBER
[Measures].[ParameterValue] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.UNIQUENAME'


MEMBER [Measures].[ParameterLevel] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.LEVEL.ORDINAL'


SELECT
{[Measures].[ParameterCaption], [Measures].[ParameterValue],
[Measures].[ParameterLevel]} ON COLUMNS ,

{ [Lieferant].[Lieferant].ALLMEMBERS }ON ROWS FROM [Test]


I cant make it to sort this resultset [Lieferant].[Name]. When I try to add
[Lieferant].[Name] to the rows in a crossjoin the sort order stays with
[Lieferant].[Lieferant]

Thanks for your help,

Regards,

Marc

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

Default Re: Cannot sort mdx resultset - 07-02-2006 , 06:59 PM






If you wish to sort by [ParameterCaption] ascending:

Quote:
WITH
MEMBER
[Measures].[ParameterCaption] AS
'[Lieferant].[Name].CURRENTMEMBER.MEMBER_CAPTION'


MEMBER
[Measures].[ParameterValue] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.UNIQUENAME'


MEMBER [Measures].[ParameterLevel] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.LEVEL.ORDINAL'


SELECT
{[Measures].[ParameterCaption], [Measures].[ParameterValue],
[Measures].[ParameterLevel]} ON COLUMNS ,

Order([Lieferant].[Lieferant].ALLMEMBERS,
[Measures].[ParameterCaption], BASC) ON ROWS
FROM [Test]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


Reply With Quote
  #3  
Old   
Marc
 
Posts: n/a

Default Re: Cannot sort mdx resultset - 07-03-2006 , 12:41 AM



Hi Deepak

thanks for your advice. I missed the second argument, that can be a valid
mdx string or numeric expression.

By the way what does BOL mean by saying a valid mdx numeric and string
expression? What you declared in the querry below, which works very well, is
a mdx measure, right?


Regards,

Marc


"Deepak Puri" wrote:

Quote:
If you wish to sort by [ParameterCaption] ascending:


WITH
MEMBER
[Measures].[ParameterCaption] AS
'[Lieferant].[Name].CURRENTMEMBER.MEMBER_CAPTION'


MEMBER
[Measures].[ParameterValue] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.UNIQUENAME'


MEMBER [Measures].[ParameterLevel] AS
'[Lieferant].[Lieferant].CURRENTMEMBER.LEVEL.ORDINAL'


SELECT
{[Measures].[ParameterCaption], [Measures].[ParameterValue],
[Measures].[ParameterLevel]} ON COLUMNS ,

Order([Lieferant].[Lieferant].ALLMEMBERS,
[Measures].[ParameterCaption], BASC) ON ROWS
FROM [Test]



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


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

Default Re: Cannot sort mdx resultset - 07-03-2006 , 10:24 AM



Hi Marc,

A measure can be considered a valid MDX expression:

http://msdn2.microsoft.com/en-us/library/ms145971.aspx
Quote:
Expressions (MDX)

An expression is a combination of identifiers, values, and operators
that Microsoft SQL Server 2005 Analysis Services (SSAS) can evaluate to
get a result.
...
Object identifier

MDX is object-oriented because of the nature of multidimensional data.
Object identifiers are considered simple expressions in MDX.
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


Reply With Quote
  #5  
Old   
Marc
 
Posts: n/a

Default Re: Cannot sort mdx resultset - 07-03-2006 , 10:41 AM



Thanks Deepak!

Marc
--
Best regards,

Marc


"Deepak Puri" wrote:

Quote:
Hi Marc,

A measure can be considered a valid MDX expression:

http://msdn2.microsoft.com/en-us/library/ms145971.aspx

Expressions (MDX)

An expression is a combination of identifiers, values, and operators
that Microsoft SQL Server 2005 Analysis Services (SSAS) can evaluate to
get a result.
...
Object identifier

MDX is object-oriented because of the nature of multidimensional data.
Object identifiers are considered simple expressions in MDX.
...



- 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.