Except (PQL)

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

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

Syntax

Except( <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 except function; it retrieves the members of an initial list that are not found in the secondary list.

The Except function is useful for building sets or lists by excluding members from other lists. It is related to the Intersect method. Also see the Not method.

Examples

This example will retrieve all the members in the Manufacturer attribute WITHOUT the top 3 manufacturers based on cost:

Except( AllMembers([manufacturers].[manufacturer]), TopCount(AllMembers([manufacturers].[manufacturer]),3, [Measures].[Cost]) )

Using the grid below, the above method would return all the manufacturers in this list EXCEPT for Nuke, Over Armour, and Ribuck: