Use the LOOKUP function to look up values in a source module or list and display the values in a target module.
Use the LOOKUP function to look up values in a source module or list and display the values in a target module.
For example, you could look up the salary for each employee in a module based on grade and region. Then you could display the salaries in a results module.
Values to lookup[LOOKUP: Mapping, LOOKUP: Mapping 2]
Argument | Data type | Description |
Values to lookup | Number, Boolean, date, time period, list, or text line item. | The data source to look up a value from. This can be a module line item or a list property, and can be in any data format. The source can be in the following syntax:
or
|
Mapping | List, date, or time line item, or a property from the source. | The mapping is the cross reference criteria. It can be a line item with a data type of list or time period. It can also be a property from the source or a date data type. The mapping matches the source line item or property with the target line item. A common dimension must link the source and the mapping cross reference. See LOOKUP examples for more information. You can enter multiple arguments as mappings. Arguments must be separated by a comma. For example:
|
The LOOKUP function returns a result of the same data type as the Source argument.
You can use LOOKUP when the source line item is a finer timescale than the mapping line item data type. Similarly you can use LOOKUP when the dimension of the target line item is a finer timescale than the dimension of the mapping line item.
However, if the time scale that you use in the results does not exist in the source, then LOOKUP returns 0. For example if you select Half-year totals in the results but it is not selected in the source, LOOKUP returns 0.
To use LOOKUP:
[LOOKUP:
in the editor.module.lineitem
or list.property
. ]
. For example, Pay Table.BasicPay[LOOKUP: Grade, LOOKUP: Region]
Pay Table.BasicPay[LOOKUP: Grade, LOOKUP: Region]
Where:
Pay Table
is the source moduleBasicPay
is a line item in the source moduleGrade
and Region
are the dimensions in the source module and line items in the results moduleFor more information on when to use LOOKUP, see Formula Usage Tips.
In Polaris, the LOOKUP function returns the value of the aggregate item in composite and non-composite hierarchies. The Classic Engine returns the value of the aggregate item in a composite hierarchy, and the default value for the line item in a non-composite hierarchy.
In Polaris, you cannot use the LOOKUP function in a result line item with a time scale greater than the values you look up. The Classic Engine returns a value of 0 in this case.
In Polaris, if the target line item can't reference the mapping line item, then the LOOKUP is invalid.
Disclaimer
We update Anapedia content regularly to provide the most up-to-date instructions.