INTERSECT function can be used to return a collection of values common to both arrays.


Syntax


INTERSECT([x,x,x,x,x], [y,y,y,y])


Parameters


= Array 1 – Either a collection of text, date or numeric values. 

= Array 2 – Either a collection of text, date or numeric values, which will be searched for in array 1.


Type of Data Returned


INTERSECT function will either return a text, date or numeric data type depending on input.


Examples


INTERSECT([‘A’, ‘B’, ‘C’, ‘D’], [‘B’, ‘E’]) will return the value of [‘B’].


INTERSECT([‘A’, ‘B’, ‘C’, ‘D’], [‘E’, ‘F’]) will return [] which is an empty collection.


Using the INTERSECT function to return items that are in a specific category and have a relationship to an individual item

INTERSECT(RELATEDITEMS(), WHERE(category ==’Strategy’)) will return the name of the related items that are in the Strategy category.