ITEM function

Prev Next

Description

Searches for a value among Items in a Dimension List unique Property, and returns the corresponding Dimension List Item, or BLANK if none is found.

Syntax

ITEM(Value to Find, Dimension.'Unique Property')

  • Value to Find can be stored in a List Property with data type Text, Number or Integer.

  • Dimension.'Unique Property' can reference any unique Property of a Dimensional List. It is possible to omit the Property name (state only the Dimension name). In that case, Pigment automatically searches in the Dimension’s Default Property.

Return type

Same Dimension as Dimension parameter

Examples

Case

Results

Return Type

ITEM("ben@corp.com", 'Employees'.'Email')

returns "Ben P.", item of the Employee List because it matches the employee email

Employee (Dimension)

ITEM("unknown@corp.com", 'Employees'.'Email')

blank if email is not recognized in the List

Employee (Dimension)

ITEM('Transactions'.'Product' & "_" & 'Transaction'.'Packaging', 'SKU'.Id)

for each row of the Transaction List, concatenates Product and Packaging and looks for the corresponding Item in the SKU list.

SKU (Dimension)

If you need a more permissive version of this function, such as a lookup function on non unique values/expressions, refer to the MATCH function.

Excel equivalent: none

See also: TIMEDIM, MATCH