Suppose, I need to write an MDX statement that selects a certain month of my Time dimension based on a Month level member property, FLAG_LAST_MONTH, below are the two approaches:
SELECT {StrToMember(Date.CurrentMember.Properties("FLAG_LAST_MONTH"))} on rows,
{} on columns
from MyCube
or
Based on the property name: FLAG_LAST_MONTH, I assume that it has a value like "1" only for one month. In that case, you could use Filter() to select the desired month member:
SELECT Filter([Date].[Month].Members,
[Date].CurrentMember.Properties("FLAG_LAST_MONTH") = "1") on rows
from MyCube
If you try to use the below query, you get an error, since Date.CurrentMember.Properties("FLAG_LAST_MONTH") - doesn't return a member,
SELECT {Date.CurrentMember.Properties("FLAG_LAST_MONTH")} on rows,
{Date.Month.Members} on columns
from MyCube
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=911884&SiteID=1
No comments:
Post a Comment