Unmatched

Function: Unmatched

Syntax

Unmatched()

Description

Unmatched is a special function which returns true if the value has not matched any of the previous facets, it does not accept any arguments.

To illustrate - if there were 3 requirements, each with different priorities:

  • Requirement A - Priority: High
  • Requirement B - Priority: Low
  • Requirement C - Priority: Medium

We could write a faceted aggregation expression:

Faceted Equal(Priority, High) AS 'Urgent',
        OrArgs(Equal(Priority, Low), Equal(Priority, Medium)) AS 'Non-Urgent'
{
   COUNT
}
WHERE EntityType = Requirement

But if we add more non-high priorities to the picklist over time, we will need to update our faceted query to then capture those values.

As an alternative we could just write this:

Faceted Equal(Priority,High) as 'Urgent',
        Unmatched() as 'Non-Urgent'
{
   COUNT
}
WHERE EntityType = Requirement

In this case, anything that doesn't match urgent will be "unmatched" and fall through to the "Unmatched()" facet.