MDX: Question best approach to query | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

MDX: Question best approach to query

I need to create a calculated measure that sums all of the activity(minutes)
in my cube from the first date in the ActivityDate dimension until a given
time for example 8/16/2001 I’m using the following MDX :
SUM(PeriodsToDate([ActivityDate].[Std].[(All)] ,[ActivityDate].[Std].[Year
Number].[2001].&[24008].&[20010816]),[Measures].[Activity Minutes]) The problem is that I need to replace the hardcoded [ActivityDate].[Std].[Year
Number].[2001].&[24008].&[20010816] with the value
of a member property in the term dimension I can almost do this using this mdx expression:
[Term].[Std].CurrentMember.Properties("TermAccessDateValue") I’m having trouble putting the two pieces together I need to somehow convert
a string to the coresponding member in the ActivityDate Dimension There seems like there must be a more elagant solution Any ideas?

To bring back an integer use VAL. VAL([Term].[Std].CurrentMember.Properties("TermAccessDateValue")) The VAL VB Function will return the number value of a string. Raulie