dbTalk Databases Forums  

Dimesnion members and their next immediate level Syntax!

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


Discuss Dimesnion members and their next immediate level Syntax! in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tony A. via SQLMonster.com
 
Posts: n/a

Default Dimesnion members and their next immediate level Syntax! - 07-14-2005 , 02:48 PM






Hello,

What is the proper MDX syntx to get the members oif a dimension and only one
level beyond it:
Dimension Geography
-Division
--Deptartment
--- Manager
----Employee

What is the syntax statement for listing only Division and Department?
Thanks
Tony


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...-olap/200507/1

Reply With Quote
  #2  
Old   
SQL McOLAP
 
Posts: n/a

Default RE: Dimesnion members and their next immediate level Syntax! - 07-14-2005 , 03:47 PM






if you want to list one level first, and the next level after (without mixing
the level members inbetween, in other words, breaking the hierarchy) you
could write something like:

select ({[geography].[division].members},{[geography].[department]}) on rows,
{whatever set you want} on columns
from [your cube]

if you want them in hierarchical order, you could write something like:

select hierarchize({[geography].[division].members} +
{[geography].[department]}) on rows,
{[whatever set]} on columns
from [your cube]

Good luck.

- Phil


"Tony A. via SQLMonster.com" wrote:

Quote:
Hello,

What is the proper MDX syntx to get the members oif a dimension and only one
level beyond it:
Dimension Geography
-Division
--Deptartment
--- Manager
----Employee

What is the syntax statement for listing only Division and Department?
Thanks
Tony


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...-olap/200507/1


Reply With Quote
  #3  
Old   
SQL McOLAP
 
Posts: n/a

Default RE: Dimesnion members and their next immediate level Syntax! - 07-14-2005 , 03:51 PM



Forgive me, I forgot to tack on "members" on the second levels of those
statements, here's the corrected syntax:


select ({[geography].[division].members},{[geography].[department].members})
on rows,
{whatever set you want} on columns
from [your cube]



select hierarchize({[geography].[division].members} +
{[geography].[department].members}) on rows,
{[whatever set]} on columns
from [your cube]

Sorry.

- Phil

"Tony A. via SQLMonster.com" wrote:

Quote:
Hello,

What is the proper MDX syntx to get the members oif a dimension and only one
level beyond it:
Dimension Geography
-Division
--Deptartment
--- Manager
----Employee

What is the syntax statement for listing only Division and Department?
Thanks
Tony


--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...-olap/200507/1


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.