dbTalk Databases Forums  

Urgent: getting next time level for a given member

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


Discuss Urgent: getting next time level for a given member in the microsoft.public.sqlserver.olap forum.



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

Default Urgent: getting next time level for a given member - 06-04-2005 , 04:43 AM






Hi,

I have a member of time dimension Time.[year].[1997].[Q1].[1]. I want
to find out a member that fits same time next Quarter which will be
Time.[year].[1997].[Q2].[4] i.e first month of next quarter. I tried
using lead, next member.

Can any one tell another way arround for this as the above donot work
much successfully as i need a generic way to move to the next time like
an year ahead or a quarter ahead. I tried VBA!DateDiff and VBA!DATEADD
but could not find much success.


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

Default Re: Urgent: getting next time level for a given member - 06-05-2005 , 06:26 PM






How about: ParallelPeriod([Time].[Quarter], -1)


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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

Reply With Quote
  #3  
Old   
OLAPMonkey
 
Posts: n/a

Default Re: Urgent: getting next time level for a given member - 06-06-2005 , 10:43 AM



You may also want to consider using the Cousins function which was
devised for this purpose and will work with any dimension type instead
of just Time. As in...

Cousin([Time].[1997].[Q1].[1],[Time].[1997].[Q2])

Which would return...

[Time].[1997].[Q2].[4]


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 - 2013, Jelsoft Enterprises Ltd.