dbTalk Databases Forums  

Simple MDX question - selecting dimension members

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


Discuss Simple MDX question - selecting dimension members in the microsoft.public.sqlserver.olap forum.



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

Default Simple MDX question - selecting dimension members - 09-21-2005 , 12:42 PM






When I run an MDX query like this:

select [Dimension Name].Members on columns from [Cube Name]

the result comes back with multiple columns and one "row". Obviously I'm not
requesting any measure values (or anything else on rows), so I assume the
server/client library/whatever is synthesizing that row. What do the
contents of that row represent?




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

Default Re: Simple MDX question - selecting dimension members - 09-21-2005 , 11:45 PM






The values belong to the cube default measure. For example, the Foodmart
Sales cube has [Unit Sales] as default, and so these 2 MDX queries
return the same results:

Quote:
select Non Empty [Store].[Store State].Members on columns
from Sales

----------

select Non Empty [Store].[Store State].Members on columns
from Sales
where [Measures].[Unit Sales]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


Reply With Quote
  #3  
Old   
Kevin Dente
 
Posts: n/a

Default Re: Simple MDX question - selecting dimension members - 09-22-2005 , 01:26 PM



Hmm, interesting. In this case, the cube doesn't have a default measure set.
Is SSAS just picking one (this is SSAS 2005, btw)?


"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
The values belong to the cube default measure. For example, the Foodmart
Sales cube has [Unit Sales] as default, and so these 2 MDX queries
return the same results:


select Non Empty [Store].[Store State].Members on columns
from Sales

----------

select Non Empty [Store].[Store State].Members on columns
from Sales
where [Measures].[Unit Sales]



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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



Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Simple MDX question - selecting dimension members - 09-25-2005 , 11:34 PM



If you have not explicitly set a default measure I believe the first
measure in the list will be used.

BTW every dimension has a default member, its just that for all the
other dimensions their default is the All member.

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <eQh2xM6vFHA.2792 (AT) tk2msftngp13 (DOT) phx.gbl>,
kevind (AT) no (DOT) spam.denteworld.com says...
Quote:
Hmm, interesting. In this case, the cube doesn't have a default measure set.
Is SSAS just picking one (this is SSAS 2005, btw)?


"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote in message
news:OKhU4BzvFHA.3860 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
The values belong to the cube default measure. For example, the Foodmart
Sales cube has [Unit Sales] as default, and so these 2 MDX queries
return the same results:


select Non Empty [Store].[Store State].Members on columns
from Sales

----------

select Non Empty [Store].[Store State].Members on columns
from Sales
where [Measures].[Unit Sales]



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