Home > Archive > MS SQL Server OLAP > January 2006 > DateTime









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DateTime
Jimmy

2006-01-24, 7:23 am

Hi,

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

Thanks


Deepak Puri

2006-01-24, 8:24 pm

If you're using AS 2005, the value of members of a time hierarchy can be
of type date, as in Adventure Works:
[color=darkred]
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][color=darkred
]


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.droptable.com ***
Jimmy

2006-01-26, 4:58 pm

Thanks Deepak,

And what if I'm using Analysis Services 2000?

"Deepak Puri" < deepak_puri@progress
ive.com> wrote in message
news:uKOycBVIGHA.524@TK2MSFTNGP09.phx.gbl...
> 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.droptable.com ***



Deepak Puri

2006-01-26, 4:58 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.droptable.com ***
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com