February 20th, 2013, 09:33 AM
Calculation of Interest Based on Running Sum = #Error = I'm Going Crazy
Many thanks for reading. I'm going crazy trying to understand this...
Can anyone help sort out my efforts to calculate an interest value (a straight forward calculation), based on a running sum value? I would like the running sum to detect if it's the first year, and default to a specified value, and start the running sum afterwards.
I've managed to get to the point where I can get the first value, and the interest is calculated, but all other records report the error: #Error and I'm not sure why, any help?
My running balance query formula is the following:
and my Interest formula is the following:
RunningBalance: IIf([StudyYears]=[ReserveParameters]![StartingBalanceYear],[ReserveParameters]![StartingBalance],Val(Nz((DSum("[Interest]+[Contribution]+[Inflation_Adjusted_Expenditures]","Query1","StudyYears <=" & [StudyYears])),0)))
February 20th, 2013, 01:55 PM
What type of datafield is [StudyYears] ? and when you say "You found the first year" do you mean the lowest year (as in oldest)?
Last edited by meratigoerr; February 20th, 2013 at 01:59 PM.