dbTalk Databases Forums  

Urgent: MDX Query help. Is it possible?

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


Discuss Urgent: MDX Query help. Is it possible? in the microsoft.public.sqlserver.olap forum.



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

Default Urgent: MDX Query help. Is it possible? - 12-05-2003 , 05:26 AM






Hi,

I have a requirement to show Top 2 members of a dimension (attribute
level). Following query works well to select top 2 members for measure
PP100.

SELECT TopCount(factor.atrribute.Members, 2, PP100) on Rows,
{Measures.Members} on Columns
From OCWCube

However, I wanted to have names of factor.attribute.members be qualified by
their parent level.

For example if factor dimension has members like following

Factor Attribute PP100
(Parent Dim) (Child Level) (Measure)
---------------------------------------
F1 A1 100
F1 A2 110
F1 A3 90
F2 A4 105
F2 A5 107
F3 A6 125

and above query selects

Attribute PP100
-------------------------
A2 110
A6 125

then I want attributes names to be fecthed as following

Attribute PP100
-------------------------
F1-A2 110
F3-A6 125

I will appreciate any help.

regards

-KulBhushan



Reply With Quote
  #2  
Old   
Tom Chester
 
Posts: n/a

Default Re: Urgent: MDX Query help. Is it possible? - 12-05-2003 , 12:08 PM






You can create a calc that concatenates member name and parent name, but
this can't be used in place of the member.

WITH MEMBER
Measures.[LongName] AS
' MyDim.CurrentMember.Parent.Name + ' - ' +
MyDim.CurrentMember.Name '

tom @ the domain below
www.tomchester.net


"Kul" <ksharma_71 (AT) hotmail (DOT) com> wrote

Quote:
Hi,

I have a requirement to show Top 2 members of a dimension (attribute
level). Following query works well to select top 2 members for measure
PP100.

SELECT TopCount(factor.atrribute.Members, 2, PP100) on Rows,
{Measures.Members} on Columns
From OCWCube

However, I wanted to have names of factor.attribute.members be qualified
by
their parent level.

For example if factor dimension has members like following

Factor Attribute PP100
(Parent Dim) (Child Level) (Measure)
---------------------------------------
F1 A1 100
F1 A2 110
F1 A3 90
F2 A4 105
F2 A5 107
F3 A6 125

and above query selects

Attribute PP100
-------------------------
A2 110
A6 125

then I want attributes names to be fecthed as following

Attribute PP100
-------------------------
F1-A2 110
F3-A6 125

I will appreciate any help.

regards

-KulBhushan





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.