I guess script goes like..
[time].[date].currentmember
but it does not work.
I'm green with these MDX scripts.. I'd be very pleased if some one of you gurus could help me.
Best Regards,
Eeva
You can use StrToMember() for this, e.g.:
StrToMember ("[Date].[Calendar Date].[2003].[H" +
CStr(IIf(Month(Now()) <= 6, 1, 2)) + " CY 2003].[Q" +
CStr(DatePart("q", Now())) + " CY 2003].[" + Format(Now(), "MMMM") + "].[" +
Format(Now(), "MMMM") + " " + CStr(Day(Now())) + "]")
assuming Year-Half Year - Quarter - Month - Day user-defined hierarchy. If you use a special format for the Date dimension key, e.g. YYYYMMDD and you should, then you can simplify the above syntax and use the Day attribute hierarchy directly, e.g. [Date].[Day].[Day].&[20070323]
No comments:
Post a Comment