Problem with ParallelPeriod() function
One of the clients had very weird Date dimension. They simply mapped weeks to months with no pattern in mind. For example, [May 2008] in that dimension has 5 weeks, whereas [May 2009] – 4. Still, they want to use ParallelPeriod() to compare same members between different years and expect to see meaningful data. Looks like ParallelPeriod doesn’t work that way. Whenever there is a user-defined hierarchy and same child in different years belongs to the different parents (Months), ParallelPeriod will make a shift following the hierarchy path and return a child under the same parent of the parallel period. For example, if you have [Week 22, 2009] member and want to select parallel member from year 2008, the [Week 23 2008] will be returned and the reason: [Week 22, 2009] member is the first child of [June 2009], so ParallelPeriod will follow Year-Quarter-Month-Week hierarchy and select the first child of [June 2008] which is [Week 23 2008.
Read more...Tags: mdx, time dimension