Creates a table showing distinct values in the first column, and number of occurrences in the second.
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.
Rule | Result | Meaning |
---|---|---|
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. |
This is the Customers table that has each occurrence counted.
FirstName | SecondName | Company | City | Country |
---|---|---|---|---|
Jeff | Beach | Stromann Roofing LLC | Columbus | USA |
Thomas | Jackson | King LLC | San Francisco | USA |
Sam | Jones | Cork & Sons | Cardiff | United Kingdom |
Juliette | Dobois | Marquardt Pouros | Lyon | France |
Isabella | Wem | Bayer Welch | Velbert | Germany |
Martin | Biddiss | Howell West Ltd | London | United Kingdom |
Freddie | Milleton | Hill Ltd | Toronto | Canada |
Patrick | Dishman | Harber and Dietrich | Charlotte | USA |
Ivett | Oaks | Cartman Group | Dumfries | United Kingdom |
Tobe | Hellyar | Schneider Manz | Berlin | Germany |
Entry | Count |
---|---|
Country | 1 |
USA | 3 |
United Kingdom | 3 |
France | 1 |
Germany | 2 |
Canada | 1 |