I am trying to write a calculated member that is an expression of the following series:
A(t) = A(t-1)*(1+R1) + a(t)*(1+R2)
where A(t) represents the aggregate value of the measure and a(t) represents the value observed during the period t. R1, R2 and a(t) are all calculated members themselves that are basically the first level of calculation above my facts. At any point along my time dimension t, I will be running the calculation for either 3 months or 12 months. The code for my calculated member is as follows but it simply runs away and never completes:
[Measures].[BigA]
AS
iif(([Measures].[BigA],[Dim Time].[Time].currentmember.prevmember)=null,[measures].[littlea],([Measures].[BigA][Dim Time].[Time].currentmember.prevmember)*(1+[Measures].[R1])) + [measures].[littlea]*(1+[Measures].[R2])
Any suggestions