ListContainsAny (PQL)

Returns true if ANY items in the second list are contained in the first list

  • Returned Output: Boolean
  • Library: PQL \ Semantic \ Logical
  • Version: 2023.10.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

ListContainsAny( <List> , <List> )

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

Comments

ListContainsAny takes two lists as its arguments and checks whether any of the items in the second list are contained in the first list. It returns a boolean.

  • Each list represents elements from a hierarchy.
  • Each hierarchy name needs to be a Unique Name with the format [dimension].^[hierarchy] or [table].[column].
Different Function types
  • There are two ListContains functions; this function returns true if any values in the second list are also present in the first list, while the other returns true only if all values in the second list are present in the first list. For details, see ListContainsAll (PQL).

Examples

The following example returns true, since Australia is in both lists:

ListContainsAny( {[Customer].[Country].[Australia], [Customer].[Country].[Canada], [Customer].[Country].[France]}, {[Customer].[Country].[Australia], [Customer].[Country].[Germany]} )