LookUp (Average)
This function returns the average of all the ReturnValues of the lines in an ASCII file where the LookUpValue equals the SourceSymbol value.
where:
- Average is the name of the lookup method.
- Table is the name of an ASCII file containing the table of values to be referenced by the LookUp function.
- SourceSymName is a symbol in the dimension specifying the criteria for selection.
If the criteria are not found, the cell is not changed. To avoid any confusion, specify the values in the target symbol as zero before running a Model Document.
Example table
10 @ 110
11 @ 200.50
222 @ FOUND1
12 @ 130
13 @ 140
11 @ 333.01
15 @ 150
16 @ 50.25
11 @ 100.25
222 @ FOUND2
If the LookUpTable file contains the entries shown above and CASH1 contains 11, the value returned is average of 200.50, 333.01 and 100.25 and this is assigned to SALES2.
(If the ReturnValue for a line that matches is a string, it is treated as numeric 0).