dbTalk Databases Forums  

Generating a set of a range of dates

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


Discuss Generating a set of a range of dates in the microsoft.public.sqlserver.olap forum.



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

Default Generating a set of a range of dates - 02-22-2006 , 08:07 AM






Hi,

This should be quite simple but I can't work out the syntax. I need to
create a set starting from the start of the year and stopping at the value in
[ForecastMonth].[Month], which is a different dimension (but equivalently
structured) to my [Time] dimension. I have:

WITH MEMBER ForecastYTD2005 as
Sum({[Time].[Month].[200501]:LinkMember(Time].[Month],
[ForecastMonth].[Month].currentmember}) which generates an error since
LinkMember can;t be used here. What should I try?

This is meant to be used as a total measure , i.e. I need to see a set of
measures on one axes and Account groups on another so that the measures are
time-independent:
ActualsYTD005, ForecastYTD2005, ForecastFY2005, etc
I can't get YTD to work at this total level, it only works when you're
looking at it by month.

TIA,
Rob

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

Default Re: Generating a set of a range of dates - 02-22-2006 , 10:39 PM






Hi Rob,

Looks like you have LinkMember() parameters reversed, unless it's a
typo:

http://msdn2.microsoft.com/en-us/lib...8(SQL.90).aspx
Quote:
LinkMember (MDX)

Returns the member equivalent to a specified member in a specified
hierarchy.

Syntax

LinkMember(Member_Expression, Hierarchy_Expression)
...
Quote:

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