May 1, 200421 yr We have a donation table with fields ID, Date, and Amount We have a calculation field "CurrentYearTotal" that needs to display the sum of all donations (a sum of donations) made within the current year (Jan. 1st to today) Can we do this with out a script and just a Calculation Field? So basically how do I restrict the records that are summed without dong a find. We don't want to do a find because we want to be able to see all time grand total next to current year total. I'll capitulate if a script is the only way to do it but I really prefer not to use one.
May 1, 200421 yr You can do it, but it may run much more slowly than a script if you have a large number of records. You need a calculation number field cYearDate equal to Year(Date), an unstored calculation number field cYearNow equal to Year(Get(CurrentDate)), a self-relationship from cYearNow to cYearDate, and your CurrentYearTotal field equal to Sum(selfrel::Amount).
Create an account or sign in to comment