BackStory
I am working in MDX and my measure groups use many calculations. Many of these are timeframes such as [Date].[Fiscal].[LY WTD]
which stands for last year week to date.
To calculate this I was using the ParellelPeriods function. However as our calendar has 52 weeks for one year and 53 for the current year my calculations are off.
I have made my changes using
CREATE MEMBER CURRENTCUBE.[Date].[Fiscal].[LY WTD] as
Aggregate(
Exists(
[Date].[Date].[Date].members,
{
[Date].[F Day Of Week].[F Day Of Week].item(0) :
Exists([Date].[F Day Of Week].[F Day Of Week].members, [Date].[Last Complete Day].&[Y]).item(0)
}
* Exists([Date].[F Year].[F Year].members,[Date].[Last Complete Day].&[Y]).item(0).lag(1)
* Exists([Date].[F Week of Year].[F Week of Year].members, [Date].[Current Week].&[Current Week])
)
), VISIBLE = 0;
I now need to test this.
Problem How can I determine what week my measure [Date].[Fiscal].[LY WTD] is pulling back?
Could you add a test member like this?