Counts the number of set members that meet a specified condition, excluding records in which the condition is $Null.
|expression||is any expression|
Number, with no decimal places.
Expression is often a WHERE expression that includes only selected set members in the counting operation. If the WHERE expression (expr1 WHERE expr2) is true, then the member containing expr1 is included in the running count; otherwise, expression is considered $Null and is not included in the running count.
compute Employees where DeptName=”Sales”
evaluate (let EmpsInSales = $count(LastName where LastName = “Smith”))
First finds all employees in the sales department, then counts the number of Smiths among those employees.
add Employees from TestData let EmpNum = ($count(“”)+1000)
As employee data is added, each new record is counted. New employee records are assigned unique employee numbers in sequence, based on the current value of $count plus 1000.