dbTalk Databases Forums  

Multiple Time Hierarchies

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Multiple Time Hierarchies in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jay
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.