dbTalk Databases Forums  

MDX Members function doesn't include calculated members

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


Discuss MDX Members function doesn't include calculated members in the microsoft.public.sqlserver.olap forum.



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

Default MDX Members function doesn't include calculated members - 12-12-2003 , 09:53 AM






If I run the following MDX query:

select {[Measures].members} on AXIS(0)
from [MyCube]

the results don't include any calculated members.

If I specify the calculated member by name, ie:

select {[Measures].AveragePrice} on AXIS(0)
from [MyCube]

it works fine.

Also, if I browse the dimensions with ADOMD, it shows the calculated
members:

con.ActiveConnection = "Provider=msolap; etc."
Set cube = con.CubeDefs(0)
Set dimn = cube.Dimensions("Measures")
For Each m In dimn.Hierarchies(0).Levels(0).Members
Debug.Print m.Name
Next m


Am I doing something wrong? If it makes a difference, I'm using ADO MD
and Excel 2000.

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

Default Re: MDX Members function doesn't include calculated members - 12-12-2003 , 10:31 AM






Two solutions:

Measures.AllMembers
or
AddCalculatedMembers(Measures.Members)

public @ the domain below
www.tomchester.net

"Glen K" <blah (AT) blah (DOT) com> wrote

Quote:
If I run the following MDX query:

select {[Measures].members} on AXIS(0)
from [MyCube]

the results don't include any calculated members.

If I specify the calculated member by name, ie:

select {[Measures].AveragePrice} on AXIS(0)
from [MyCube]

it works fine.

Also, if I browse the dimensions with ADOMD, it shows the calculated
members:

con.ActiveConnection = "Provider=msolap; etc."
Set cube = con.CubeDefs(0)
Set dimn = cube.Dimensions("Measures")
For Each m In dimn.Hierarchies(0).Levels(0).Members
Debug.Print m.Name
Next m


Am I doing something wrong? If it makes a difference, I'm using ADO MD
and Excel 2000.



Reply With Quote
  #3  
Old   
Glen K
 
Posts: n/a

Default Re: MDX Members function doesn't include calculated members - 12-12-2003 , 12:47 PM



On Fri, 12 Dec 2003 08:31:02 -0800, Tom Chester wrote:

Quote:
Measures.AllMembers

Thats what I needed. Thanks a lot.



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.