Default Member on Time Dimension - Bug?? -
12-18-2006
, 03:56 PM
Hi
We have set a default member on our time dimension using the following
script. The idea is to set the default member to the current day
STRTOMEMBER
(
"[Time].[PK Date].&["+ cstr(Year(NOW()))
+"-"+ iif(len(cstr(Month(Now()))) = 1, "0" + cstr(Month(Now())) ,
cstr(Month(Now())))
+ "-" + iif(len(cstr(Day(Now()))) = 1, "0" + cstr(Day(Now())) ,
cstr(Day(Now())))
+ "T00:00:00]")
This appears to works fine. When I open SQL Management Studio and select
[Time].[PK Date].DefaultMember it returns the correct day.
However, when I try and access the the default member property via adomd.net
I get a completly different date (11 Jan 2006). I tried accessing the
default member property of the hierarchy in the object model as well as
using MDX and executeCellset(). Both return incorrect data.
Can someone confirm that this is a bug or am I missing something? If it is a
bug, has anyone come up with a workaround?
I am running SSAS 2005 Dev SP1 on WinXP dev box.
Cheers |