Hello,
I have used the time intelligence wizard in VS 2008 BIDS to add time intelligence to both my date dimension and a cube. One of the calculated members it created in my cube is defined -
Create Member CurrentCube.[Date].[Year-Month-Date Calculations].[Year to Date] As "NA" ; // Year to Date ( [Date].[Year-Month-Date Calculations].[Year to Date], [Date].[Year].[Year].Members, [Date].[Date].Members ) = Aggregate( { [Date].[Year-Month-Date Calculations].[Current Date] } * PeriodsToDate( [Date].[Year-Month-Date].[Year], [Date].[Year-Month-Date].CurrentMember ) ) ;
This works perfectly.
I want to modify this so that i have "Year to Date Prior Year" member using the ParallelPeriods function with no luck. What i want is member that will calculate the year-to-date for same date 1 year before the curretly selected date. I have researched this and read other posts on this forum and tried everything I can think of. The following MDX always returns null even though I know it is not in the data
ParallelPeriod([Date].[Year-Month-Date].[Year], 1, [Date].[Year-Month-Date].CurrentMember);
Any advice as to why this is so would be appreciated!
Also, why is there a multiplication (*) inside of the aggregate function in the wizard generated code?
Thanks