Home Search

DriveWorks Solo 22
Dcount

Send Feedback

Dcount

Returns the number of cells in a specified column of a specified table that match the specified condition.

Syntax

Dcount([Table], [Column], [Condition], [Ignore Whitespace])

Where:

Table is the table within which the cells are to be counted.

Column is the column number within the table which the cells are to be counted.

Criteria is the search condition that when matched will count the cells in the column.

Ignore Whitespace (optional) is True to ignore leading/trailing whitespace characters in text strings in the condition, otherwise False.

Examples

Rule

Meaning
Dcount(PeopleTable,4,"=Male ", True)Counts the number of cells in the fourth column of the people table that equal Male. Will remove the whitespace, in the condition (after the e, "=Male ").
Dcount(PeopleTable,2,"<>"""")Counts the number of cells in the second column of the people table that does not equal blank ("").
Dcount(PeopleTable,3,">30")Counts the number of cells in the third column of the people table where the value is greater than 30

Example Outcomes

Table

Column

Criteria

Result of the Dcount function

PeopleTable4"=Male "3
PeopleTable3"<50"4

Sample Data

PeopleTable

Member IDNameAgeGender
42Dave Sharp25Male
44Joe Bloggs37Male
96Sandra Shield42Female
107Thomas Knight21Male
251Isabelle Jones56Female