ITEM function

  • 21 December 2021
  • 0 replies
  • 3351 views

Userlevel 4
Badge +6
  • Community Manager
  • 20 replies

 

Description

Searches a value in a Dimension List unique property,  returns the item matching the value and  BLANK if none is found.

 

Syntax

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

  • Value to Find can be stored in a Metric of List Property of text, number or integer type

  • List.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 will automaticaly map the Default Property of the Dimension.

 

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("unkown@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 look for the corresponding item in the SKU list.

SKU (Dimension)

 

 

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

 

Excel equivalent: none

See also: TIMEDIM, MATCH


This topic has been closed for comments