ListContainsAll (PQL)
Returns true if ALL 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
* Click on the function's arguments above for more details on the input values.
Comments
ListContainsAll takes two lists as its arguments and checks whether the items in the second list are all 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]
.
Note: This function does not a check that the lists are identical, it checks that all items in the second list are present in the first list.
Different Function types
- There are two ListContains functions; this function returns
true
if all values in the second list are present in the first list, while the other returnstrue
if any values in the second list are present in the first list. For details, see ListContainsAny (PQL).
Examples
The following example returns true
, since the countries in the second list are all present in the first list:
ListContainsAll( {[Customer].[Country].[Australia], [Customer].[Country].[Canada], [Customer].[Country].[France]}, {[Customer].[Country].[Australia], [Customer].[Country].[Canada]} )
The following example returns false
, since the country Austria is present in the second list but not present in the first list:
ListContainsAll( {[Customer].[Country].[Australia], [Customer].[Country].[Canada], [Customer].[Country].[France]}, {[Customer].[Country].[Australia], [Customer].[Country].[Austria]} )