Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

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.

Syntax:

LOOKUP ("Average","Table",SourceSymName)

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.

Table format

LookUpValue @ ReturnValue

 

All LookUp values must be numeric.

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

Syntax example:

SALES2=LOOKUP("Average",LookupTable.txt,CASH1)

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).

Published:

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.

Syntax:

LOOKUP ("Average","Table",SourceSymName)

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.

Table format

LookUpValue @ ReturnValue

 

All LookUp values must be numeric.

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

Syntax example:

SALES2=LOOKUP("Average",LookupTable.txt,CASH1)

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).

For an optimal Community experience, Please view on Desktop