Multiple Time Hierarchies -
07-15-2005
, 11:18 AM
Hello,
I have two time dimensions, Calendar and Fiscal, and am trying to get a
simple moving average calculation to work for both but can only get it
to work for calendar time. My MDX script is:
IIF ([Lift Date].[Fiscal].CurrentMember.L*evel.Ordinal > 0,
IIF([Lift Date].[Fiscal].CurrentMember.L*evel.Name="Day",
avg(Lastperiods(14),[Measures]*.[Net Volume]) , null ),
IIF([Lift Date].[Calendar].CurrentMember*.Level.Name="Day",
avg(Lastperiods(14),[Measures]*.[Net Volume]) , null)
)
The above script only works for Calendar time. What I believe I'm
saying is - if Fiscal time has a value (.Ordinal > 0) then perform
calculation on Fiscal Day. However, this doesn't work - only Calendar
Day performs the calc. I assume I misunderstand '.Ordinal>0', as I'm
fairly new to MDX.
Can anyone point me in the right direction?
Thank you in advance,
Jay |