There are multiple ways to handle this depending on what you actually need.
One way is to just create a member property on the month level of the
dimension and call it "CurrentMonth" for example. Then you could simply
have this MDX to identify the current month.
FILTER(AccountingMonth.month.members,
AccountingMonth.currentmember.properties("CurrentM onth") = 1)
Another alternative is to use the VBA Now() function and do some string
manipulation. Here's an example.
StrToMember("[AccountingMonth].[Month].[" + Format(Now(), "mmmm ") + "]")
You'll have to use the appropriate arguments for the format function based
on how you are formatting your dates. The easiest way to test this out is
to create a calculated member on the measures dimension that displays the
result of the format function.
Sean
--
Sean
--
Sean Boon
SQL Server BI Product Unit
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
"Narayan" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
I have a Date dimension called Accounting Month. I want to know what is
the current month ; Please let me know what's the MDX for it.
E.g. I want to write IIf [Accounting Period].Month=Jan2003 ,ABABAB,ccccc) |