dbTalk Databases Forums  

MDX Query to get list of dimensions and measures

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


Discuss MDX Query to get list of dimensions and measures in the microsoft.public.sqlserver.olap forum.



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

Default MDX Query to get list of dimensions and measures - 10-09-2003 , 03:59 PM






Can someone give me a quick example of an MDX query that lists
dimensions on a cube? Also another example for determinining an MDX
query to list measures of a cube.

thanks for any and all help,

Scott

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

Default MDX Query to get list of dimensions and measures - 10-09-2003 , 04:31 PM






To obtain OLAP schema information, such as dimensions in a
cube, cubes in a database, and so on, you should use
OLE DB for OLAP schema rowsets.
The MDX Select statement is designed to retrieve data from
a cube, not the cube's structure.
You also have the option to use other interfaces based on
OLE DB for OLAP, such as ADO MD, ADO MD.Net or XML/A
(Discover Method).
HTH,
Brian
www.geocities.com/brianaltmann/olap.html






Quote:
-----Original Message-----
Can someone give me a quick example of an MDX query that
lists
dimensions on a cube? Also another example for
determinining an MDX
query to list measures of a cube.

thanks for any and all help,

Scott
.


Reply With Quote
  #3  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: MDX Query to get list of dimensions and measures - 10-09-2003 , 06:23 PM



"Brian Altmann" <brianaltmann (AT) yahoo (DOT) com> wrote

Quote:
To obtain OLAP schema information, such as dimensions in a
cube, cubes in a database, and so on, you should use
OLE DB for OLAP schema rowsets.
Agree with Brain. You still can use MDX statements to get this information
if you need to create some generic calculations.
I.e.

Measures.MEMBERS - returns all visible measures
Measures.ALLMEMBERS - returns all visible measures and all visible
calculated measures
Dimensions.Count - returns number of dimensions
Dimensions.Item( i ) - returns dimension with index i
<dim>.Levels.Count - returns number of levels in dimension
<dim>.Levels.Item( i ) - returns level with index i in dimension

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================




Reply With Quote
  #4  
Old   
joerg
 
Posts: n/a

Default MDX Query to get list of dimensions and measures - 10-10-2003 , 06:20 AM



Hello,
Open a Cellset with
"Select from [CUBE]"
and loop through the
cset.filteraxis Collection

HTH
Jörg




Quote:
-----Original Message-----
Can someone give me a quick example of an MDX query that
lists
dimensions on a cube? Also another example for
determinining an MDX
query to list measures of a cube.

thanks for any and all help,

Scott
.


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.