![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Basically the measure entails pulling net sales Month To Date for the same day last year as the currently selected day node in my time dimension. ie., Today is December 14th, 2005. They want net sales for Month To Date for December 14th, 2004. At first glance this seemed rather trivial, I used the ParallelPeriod function. However this function does not find the exact same date it finds the relative calendar date. ie. today is 2nd Wednesday of December 05, so it returns that parallel period in 04 not the 14th. I can use the lag function and Lag(365), however this solution will not accommodate for leap year. Do you have any MDX that would calculate in Leap Year? My MDX expression is below: Sum( PeriodsToDate ( [Time].[By Fiscal Year PSP].[The Month], ParallelPeriod ( [Time].[By Fiscal Year PSP].[The Fiscal Year], 1, StrToMember ( IIf( IsEmpty([Time].[By Fiscal Year PSP] .CurrentMember.LastChild ) , "[Time].[By Fiscal Year PSP] .CurrentMember", "[Time].[By Fiscal Year PSP] .CurrentMember.LastChild" ) ) ) ) , [Net Sales] ) |
![]() |
| Thread Tools | |
| Display Modes | |
| |