Intersect

Returns a list of every element from an initial list that is ALSO found in the second list.

  • Returned Output: List
  • Library: PQL \ Semantic \ List
  • Version: 2018.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

Intersect( <List> , <List> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The first list represents an initial listing of elements from a hierarchy.
  • The second list represents a secondary listing of elements from same hierarchy.
  • For details on how to employ and use this function see the semantic calculation overview.

This function is like the MDX intersect function; it retrieves the members of an initial list, that are also found in the secondary list.

The intersect function is useful for building sets or lists by finding members common to 2 lists. Used in the proper fashion, it is a robust way to performing conjoined operations on multiple list-based functions in a single step.

It is related to the Except method.

Examples

This example retrieves all the members in the first 4 Manufacturers that are ALSO in the bottom 50% of manufacturers based on cost:

Intersect( Head(AllMembers([manufacturers].[manufacturer]),4), BottomPercent(AllMembers([manufacturers].[manufacturer]),50, [Measures].[Cost]) )

Using the grid below, the above method would return Acme, Adihash, and Esics: