The number of elements in a set. When applied to group attributes, it calculates the number of attributes whose values are within a specified range. When applied to a set of attribute values, it calculates the number of values is the set.
The syntax is:
number of { names } in range [lower, upper]
or
number of CalculatedValueAttributeName
or
number of Attribute as set
where:
names is a comma separated list of attribute names or group attribute names,
lower and upper are numbers or constants defining the range,
CalculatedValueAttributeName is the name of some calculated value attribute that gives a list of attribute names or attribute group names.
Attribute is the name of some attribute whose values are in a comma-separated list.
A typical use of this function would be in a condition. For example, you could define the calculated value attribute:
HighAllergens: {birch, timothy, mugwort, cat, dog} in range [20, 50]
and the case would then appear as:
age 6 sex F birch 50.0 timothy 63.5 mugwort 12.1 cat 64.6 dog 25.3 HighAllergens cat (64.6), timothy (63.5) and birch (50.0)
A comment could now be created that used the expression HighAllergens to list the allergens in the range [20,50], and given using the condition number of HighAllergens > 0. (An equivalent condition would be HighAllergens is not empty).
Alternatively, if HighAllergens had not been defined, you could use the more explicit syntax in the condition, for example
number of {birch, timothy, mugwort, cat, dog} in range [20, 50] > 0
See also: