dbTalk Databases Forums  

How do I dynamically get all the levels I need in MDX?

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


Discuss How do I dynamically get all the levels I need in MDX? in the microsoft.public.sqlserver.olap forum.



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

Default How do I dynamically get all the levels I need in MDX? - 09-06-2004 , 05:51 PM






I need to modify my MDX query so that I get all the levels for a
particular dimesnion.

In the following query, I get all the levels in my ProdHierarchy
dimension, starting at level 04. However, there are times when there
may be a different number of levels. How do I dynamically get all the
members without specifying a particular level to start from? The part
of the query below I would need to modify is "[ProdHierarchy].[Level
04].ALLMEMBERS". I'm terrible at MDX and would appreciate any help
using a specific example. Thanks.

SELECT { [Measures].[Amt Sold], [Measures].[Num Sold] } ON COLUMNS, {
(YTD([TimeDimension].[2004].[Quarter 4].[December]) *
[ProdHierarchy].[Level 04].ALLMEMBERS) } DIMENSION PROPERTIES
MEMBER_CAPTION ON ROWS FROM [Sales]

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.