Compute a Running Sum |
How To... > Work with Formulas > Work with the Formula Editor > Compute a Running Sum Suppose you have a collection of daily sales receipts stored in an attribute named Receipts and you want to keep a running total.
This works because the prev function for the first case returns 0, unless you specify otherwise. If you wanted the running total to reflect last month’s receipts, you would include that number. For example, if you wanted the initial value to be 1000, you would use this formula: prev(RunningTotal,1000)+ Receipts |