dbTalk Databases Forums  

DateTime

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


Discuss DateTime in the microsoft.public.sqlserver.olap forum.



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

Default DateTime - 01-24-2006 , 06:06 AM






Hi,

Is there a way to determine what time period a member represents?

Thanks



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

Default Re: DateTime - 01-24-2006 , 07:40 PM






If you're using AS 2005, the value of members of a time hierarchy can be
of type date, as in Adventure Works:

Quote:
with Member [Measures].[DateVal] as
'[Date].[Date].CurrentMember.MemberValue'

select {[Measures].[DateVal]} on 0,
Tail([Date].[Date].[Date].Members, 10) on 1
from [Adventure Works]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


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

Default Re: DateTime - 01-25-2006 , 03:53 AM



Thanks Deepak,

And what if I'm using Analysis Services 2000?

"Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
If you're using AS 2005, the value of members of a time hierarchy can be
of type date, as in Adventure Works:


with Member [Measures].[DateVal] as
'[Date].[Date].CurrentMember.MemberValue'

select {[Measures].[DateVal]} on 0,
Tail([Date].[Date].[Date].Members, 10) on 1
from [Adventure Works]



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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



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

Default Re: DateTime - 01-25-2006 , 01:00 PM



With AS 2000, since there is no official "member value", I'm not aware
of one standard solution. Some of the options that I've seen are:

- Parse time member name into date, using VBA functions
- Add a specific Member Property to hold a date string
- Use the MDX Rank() function for relative position


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