I have the following code which works as a means of returning the equivalent member on the comparable year (LFL) dim. When running queries at week level (ignore the scope statetment below) performance isn't great (due to the number of LINKMEMBERS I think). Is there a way that I can get it to do something different at levels below year (based upon the currently selected year)? I thought that DESCENDANTS might be a an option (based upon the current LFL year) but don't think that will work.
SCOPE [Date].[Business Date Hierarchy].[Bus Yr]; ( [Date Tool].[Comparison].[Previous Year] ) = SUM ( ( LINKMEMBER ( [Date].[Business Date Hierarchy].CURRENTMEMBER, [DateLFL].[Business Date Hierarchy] ), { PARALLELPERIOD([Date].[Business Date Hierarchy].[Bus Yr], 0, [Date].[Business Date Hierarchy].CURRENTMEMBER), PARALLELPERIOD([Date].[Business Date Hierarchy].[Bus Yr], 1, [Date].[Business Date Hierarchy].CURRENTMEMBER) } ) , [Date Tool].[Comparison].DEFAULTMEMBER ); FREEZE; END SCOPE;