4th Dimension includes seven statistical functions for use on fields, including Sum, Average, Min, Max, Std deviation, Variance and Sum squares. However, these functions only work on fields and may be restricted to use within specific phases of a PRINT SELECTION report. In other situations, the built-in functions can't be used. Fortunately, it's straightforward to rewrite these basic statistical functions using native 4th Dimension code. The sample database accompanying this database implements standard statistical for use with numeric arrays.
Download Complete Tech Note and Example: Windows | Mac