THRESHOLD and THRESHOLD2
THRESHOLD and THRESHOLD2 functions return a new set containing the domains of an existing set the scores of which satisfy a given condition with respect to the score of a specific domain.  
For example, in:
var destinationSet  = THRESHOLD(sourceSet, ">=" ,"1.01");
the THRESHOLD function returns the domains of sourceSet whose score is greater than or equal to that of the 1.01 domain, while in:
var destinationSet  = THRESHOLD2(sourceSet, "<" , 20, "1");
the THRESHOLD2 function returns the domains of sourceSet whose score is less than 20% of the score of domain 1.
Since the only domains with a score are those listed in the hidden results table, only domains with a matching entry in that table are considered.
The THRESHOLD syntax is:
THRESHOLD(set, operator, domain)
where:
- setis a set variable.
- operatoris one of the comparison operators listed in the table below.
- domainis the domain name or ID.
The THRESHOLD2 syntax is:
THRESHOLD2(set, operator, fraction, domain)
where:
- setis a set variable.
- operatoris one of the comparison operators listed in the table below.
- fractionis an integer or decimal number representing a percentage.
- domainis the domain name or ID.
The operator must be enclosed in quotation marks.
| Operator | Description | 
|---|---|
| = | Equal | 
| <> | Not equal | 
| > | Greater than | 
| >= | Greater than or equal | 
| < | Less than | 
| <= | Less than or equal |