dbTalk Databases Forums  

Can a query return a list of all measures?

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


Discuss Can a query return a list of all measures? in the microsoft.public.sqlserver.olap forum.



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

Default Can a query return a list of all measures? - 10-08-2004 , 10:37 AM






I want to make an MDX query that will return a list of available measures.
Can anyone help with this?


Thanks,

Jim



Reply With Quote
  #2  
Old   
Jamie Thomson
 
Posts: n/a

Default RE: Can a query return a list of all measures? - 10-08-2004 , 01:21 PM






Try:
select
measures.children on rows
from <cube>

Regards
Jamie Thomson
http://www.conchango.com



"Jim L" wrote:

Quote:
I want to make an MDX query that will return a list of available measures.
Can anyone help with this?


Thanks,

Jim




Reply With Quote
  #3  
Old   
Jim L
 
Posts: n/a

Default Re: Can a query return a list of all measures? - 10-08-2004 , 03:17 PM



I"m not getting anywhere with this.

The MDX sample app that comes with reporting services reports
an "Axis name is unrecognized or duplicated or creates a sequence gap
'rows'" . If I try to put it on columns I get an "Cells cannot be created
..... because one of the axis contains no postitions"

I have also tried with the ProClarity OLAP client application and get the
same "..sequence gap" error message.

Jim




"Jamie Thomson" <jamie.thomson (AT) donotspam (DOT) conchango.com> wrote

Quote:
Try:
select
measures.children on rows
from <cube

Regards
Jamie Thomson
http://www.conchango.com



"Jim L" wrote:

I want to make an MDX query that will return a list of available
measures.
Can anyone help with this?


Thanks,

Jim






Reply With Quote
  #4  
Old   
Jamie Thomson
 
Posts: n/a

Default Re: Can a query return a list of all measures? - 10-08-2004 , 04:09 PM



OK, try this:
select
{measures.children} on rows,
{<dimension>.defaultmember} on columns
from <cube>

<dimension> can be any of your dimensions. It doesn't matter which one.

Regards
Jamie Thomson
http://www.conchango.com



"Jim L" wrote:

Quote:
I"m not getting anywhere with this.

The MDX sample app that comes with reporting services reports
an "Axis name is unrecognized or duplicated or creates a sequence gap
'rows'" . If I try to put it on columns I get an "Cells cannot be created
..... because one of the axis contains no postitions"

I have also tried with the ProClarity OLAP client application and get the
same "..sequence gap" error message.

Jim




"Jamie Thomson" <jamie.thomson (AT) donotspam (DOT) conchango.com> wrote in message
news:E4D8B768-30F8-4593-8EF1-F9C6D3307F3D (AT) microsoft (DOT) com...
Try:
select
measures.children on rows
from <cube

Regards
Jamie Thomson
http://www.conchango.com



"Jim L" wrote:

I want to make an MDX query that will return a list of available
measures.
Can anyone help with this?


Thanks,

Jim







Reply With Quote
  #5  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Can a query return a list of all measures? - 10-08-2004 , 05:11 PM



This is a Foodmart query that may be what you want:

with member store.[measurename] as 'measures.currentmember.name'
select {[measurename]} on columns,
measures.members on rows
from sales

You should substitute "store" by any dimension in your cube other than
measures.

As a general rule it is a better practice to retrieve metadata such as
measures, dimension members, etc using OLE DB for OLAP schema rowsets or
equivalent methods in other APIs (such as the Discover method in XML/A or the
CubeDef object in ADOMD.net).
HTH,
Brian Altmann
www.geocities.com/brianaltmann/olap.html




"Jim L" wrote:

Quote:
I want to make an MDX query that will return a list of available measures.
Can anyone help with this?


Thanks,

Jim




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.