I have two dimension properties "Project Start" and "Project End" that belong to my [Project] dimension. They stand for the start and end date of my projects. Now I want to use these values with MDX, or to be more precisely, in an IIF statement in my query. I want to now if one or both properties are after or before some parameters (projectstart ([Time].[Year - Month - Day].[Month].&[2012-01-01T00:00:00]) and projectend).
So I started to try things like this:
- Format([Project].[ParentProject].CURRENTMEMBER.PROPERTIES("Project End"), "yyyy-mm-dd") > StrToMember("[Time].[Year - Month - Day].[Month].&[2012-01-01T00:00:00]")
- [Time].[Year - Month - Day].[Month].&[2012-01-01T00:00:00].MEMBER_KEY > [Project].[ParentProject].CurrentMember.Properties("Project End")
- CDate([Time].[Year - Month - Day].[Month].&[2012-01-01T00:00:00].MEMBER_KEY) > CDate([Project].[ParentProject].CurrentMember.Properties("Project End"))
But either I get an error or the wrong case of the IIF-statement is executed. After chechkig up MSDN what I get from "[Project].[ParentProject].CurrentMember.Properties("Project End")" I'm more than confused now. On the one hand it says that I will get a string, but on the other hand (if there is a TYPED in the property definition) I should get back the data type of the value (in this case DateTime). I wonder what is right now and/or if I understood the MSDN wrong.
Maybe somebody can help me to clear that up and give me a hint how I can work with these properties.