Home Search

DriveWorks Pro 21
TableDistinctCount

Send Feedback

TableDistinctCount

Creates a table showing distinct values in the first column, and number of occurrences in the second.

Syntax

TableDistinctCount([Table or Table Name],[Column index],[Ignore case],[Include Header Row]

Where:

Table or Table Name is the table to filter.

Column index is the index of the column to group and count.

Ignore case (optional) is TRUE to group entries regardless of case, FALSE to maintain case sensitivity.

Include Header Row (optional) is TRUE to include column headers, FALSE to ignore them.

Examples

RuleResultMeaning
TableDistinctCount(DwLookupCustomers,5,TRUE,TRUE){"Entry","Count";"Country",1;"USA",3;"United Kingdom",3;"France",1;"Germany",2;"Canada",1}Returns a table array of each entry from column 5, of the Customers table, along with the number of occurrences.

Example Data

This is the Customers table that has each occurrence counted.

FirstNameSecondNameCompanyCityCountry
JeffBeachStromann Roofing LLCColumbusUSA
ThomasJacksonKing LLCSan FranciscoUSA
SamJonesCork & SonsCardiffUnited Kingdom
JulietteDoboisMarquardt PourosLyonFrance
IsabellaWemBayer WelchVelbertGermany
MartinBiddissHowell West LtdLondonUnited Kingdom
FreddieMilletonHill LtdTorontoCanada
PatrickDishmanHarber and DietrichCharlotteUSA
IvettOaksCartman GroupDumfriesUnited Kingdom
TobeHellyarSchneider ManzBerlinGermany

Example Result When Viewed As A Table

EntryCount
Country1
USA3
United Kingdom3
France1
Germany2
Canada1