runningdifference
runningdifference

The runningdifference statement calculates the running difference for the current field.

Parameters

No parameters.

Description

The runningdifference statement starts at the top of the database and subtracts each cell from the cell above it. As it scans the database it fills the field with the running total, destroying the original data in the process.

This example calculates the gas mileage after each fillup. Since the runningdifference statement will destroy the field it is used on, the procedure copies the Odometer data into a separate field called Miles. The runningdifference statement computes the number of miles driven on a tank of gas (the difference between the two odometer readings).

    field Miles
    formulafill Odometer
    runningdifference
    field Mileage
    formulafill Miles/Gallons

See Also

- @calculations --
- change -- replaces text with new text in the current field (selected records only).
- changeword -- replaces one word with another in the current field (selected records only).
- changewordexact -- replaces one word with another in the current field (selected records only).
- emptyfill -- fills every empty visible cell in the active field with the specified value.
- fill -- fills every visible cell in the active field with the specified value.
- fillall -- modifies the operation of the following *fill* statement so that all records are modified, not just visible records.
- formulafill -- fills every visible cell in the active field with the result of the specified formula.
- formulafillallfields -- fills every visible cell in all fields with the result of the specified formula.
- outlinelevel -- expands or collapses the entire database to show a specific level of data or summary level.
- propagate -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell above it.
- propagateup -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell below it.
- resetallrecordidts -- resets the internal record id and time stamps for every record in the current database.
- runmodifyfill -- runs the .ModifyFill procedure (if it exists).
- runningtotal -- calculates the running total for the current field.
- sequence -- fills every visible cell in the current field with a numeric sequence.
- slidedata -- slides the columns at and to the right of the current column.
- speedcopy -- copies multiple adjacent fields from a record in one database to a record in another.
- summarylevel -- changes the summary level of the current line.
- unpropagate -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the first (top) value.
- unpropagateup -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the last (bottom) value.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.