dbTalk Databases Forums  

rolling calculation

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


Discuss rolling calculation in the microsoft.public.sqlserver.olap forum.



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

Default rolling calculation - 05-08-2006 , 02:40 PM






DIM_TIME: year->month

1. If CurrentMember of DIM_TIME is in the past (less then system month),
then roll M_A up only. I think I got that part:

IIF(FORMAT([DIM_TIME].currentmember.Properties("Mth"), "YYYYMM") <
FORMAT(NOW(), "YYYYMM")
,
Sum(PeriodsToDate([DIM_TIME].[(All)]), ValidMeasure([Measures].[M_A]))
,
the else part is the one I need hlep!!!)

2. If CurrentMember of DIM_TIME is this month (system month) or in the
future, I need to add roll up M_A (from the past) and add M_B for this month
and/or future:

the else part I need help:

Sum(PeridsToDate(until last month, 4/06 in this case) +
Sum(PeridsToDate(from 5/06, this month, to CurrentMember)

Thanks for any help.
MJ


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.