I'm not sure that I get how multiplying one number by another is supposed to produce a "running total".
Is this what you meant?
400 400 (starting amount)
5 2000 (400 * 5)
3 6000 (2000 * 3 )
Or do you have a different progression of values in mind?
Nope, you're right. So how do i write that in FM? I know how to do it in Excel but not in FM.
Thank you for your help!!
Unlike Excel, the rows of data are fully dynamic. Any number of different records may be arranged in any number of different orders. This can affect what options work best to get the results that you want.
Here is one method, but it does not work in all situations:
Define a number field named Factor.
Define a calculation field, cTotal for your running total as a calculation field: factor * NumberField
Now return to Factor and give it this auto-enter calculation:
Let ( r = Get ( RecordNumber ) ; If ( r = 1 ; 1 ; getNthRecord ( cTotal ; r ) ) )
Put NumberField and cTotal on your layout. Enter numbers into NumberField, creating new records as needed.
As long as all the records are in your current found set and not sorted into a different order, cTotal will show the correct running total.