MATCH function

  • 10 January 2024
  • 0 replies
  • 353 views

Userlevel 3
Badge +2

Description

Searches and returns first match found, returns BLANK if none exists.

 

Syntax

MATCH(Value To Match, Expression)

  • Value To Match can be any expression, that is, a string, number, Metric, List, or List Property. It can be made up of the following data types:  text, number, integer, or Dimension.

  • Expression can be a Metric, List, or List Property, and doesn’t need to contain unique values. If Expression is a Metric, then it needs to be defined on only a single list in the Metric structure.

  • Expression and Value to Match need to be the same data types. 

  • The order for the first match found for ValueToMatch is determined by the ordering of the items in the Expression.

Returns

Type Output Structure (Dimensions)
Dimension (same as Expression)

Same as Value to Match (if any exists, else will return Dimension Item of Expression)

 

 

Examples

Case

Results

Return Type

MATCH("john@corp.com", 'Employees'.'Email')

Returns "John H.", item of the Employees List. This is returned because it’s the first match found in the employee email list.

Dimension

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

Returns blank if the email is not recognized in the List.

Dimension

MATCH(City.'Duplicate countries',Country.Name) For each row of the Duplicate Countries text property in the City List, it looks for the first matching country by name in the Country List, and then returns the first match found as an item of Country Dimension

 

Excel equivalent: Similar to VLOOKUP, where [range_lookup] is FALSE

See also: ITEM


0 replies

Be the first to reply!

Reply