COUNTA function

This topic describes the formula syntax and usage of the COUNTA function in the Data Quality Execute Formula transform.

Description

Counts how many fields are not empty in a range.

Syntax

COUNTA(value1,value2, ...)

The COUNTA function syntax has the following arguments:

  • value1 Required. Reference to a field or range of fields.
  • value2, ... Optional. Additional references to fields or ranges of fields.

Notes

  • The COUNTA function counts cells containing any type of information, including error values and empty text (""). For example, if the range contains a formula that returns an empty string, the COUNTA function counts that value. The COUNTA function does not count empty fields.
  • If you do not need to count logical values, text, or error values (in other words, if you want to count only cells that contain numbers), use the COUNT function.
  • If you want to count only cells that meet certain criteria, use the COUNTIF function.

Example

Table 1. Data record
Id First_Name Last_Name House_Number Street City Postal_Code
27 Lemon Chester Road London W64 5HY
Table 2. Count of non-empty values
Formula Description Result
COUNTA([Id]:[Postal_Code]) Non-empty fields in range of all seven fields in record. 5
COUNTA([Id],[First_Name],[Last_Name]) Non-empty fields in among 3 fields in record. 2
COUNTA([Id],[First_Name],[Street]:[Postal_Code]) Non-empty fields in two separate fields and a range of three fields in record. 4