dbTalk Databases Forums  

Help neede

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


Discuss Help neede in the microsoft.public.sqlserver.olap forum.



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

Default Help neede - 12-30-2003 , 02:23 PM






Hi all,
i have started reading about analysis services, OLAP, and MDX only the last
week so execuse me if my question is a bit silly...
in my mdx query i create a set for a date range by the following
with set [DateRangeSet] AS '{[Fiscal Time].[All Fiscal Time].[2003].[Quarter
3].[March].[1] : [Fiscal Time].[All Fiscal Time].[2003].[Quarter
2].[December].[15]}'

now i want to use the Ancestorsfunction on all the set
SELECT Ancestors([DateTimeSet],Month) on columns From theCube where
[Measures].[any measure]
ofcourse this will not work because the Ancestors function works with
members only

how i'm supposed to solve this??

Mohamed Mesalem



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

Default Re: Help neede - 12-31-2003 , 08:40 PM






The Generate() MDX function iterates over a set, so:

Quote:
Select
Generate([DateRangeSet],
Ancestors([Fiscal Time].CurrentMember,Month))
on columns
From theCube
Where [Measures].[any measure]
Quote:

- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.