Counting Different Entries in one Field The following application will give you a count of unique entries that have been made to a single field in a database. For example, you may have 1500 records with names and addresses and you would like to know how many different states are represented. You may want to know how many various zip codes you are sending a mailer to in order to get bulk postage rates. The fields and data shown in the following example are from the sample database EMPLOYEE.DTF. On the Column/Sort spec number the field whose unique entries you would like to count. This may be your state, zip or country field. Any field formatted as text will work. COL/SORT SPEC: Department: 10,AS On the Derived Column Spec you would want to enter the columns as shown below. The heading of the first column will not print and it can be left blank. It has been named here to help clarify the programming explanation. The heading of the second column should reflect what you would like to see on the report. DERIVED COLUMN SPEC: Heading: Invisible repeat of Department Formula: #10 Column Spec: 50,I Heading: Departments Formula: @Text(#10<>#50,#10) Column Spec: 20,C The Report in the Employee database would appears at the bottom of the page. Here we have asked for a listing and count of the various departments in the company. **Note: If you do not wish to the complete list of entries, simply set 'Print Totals Only' on the Print Options Screen to 'YES'. Departments ----------- ACCNT ADMIN EXEC LEGAL OPS PROMO R&D SALES =========== Count: 8 Q & A Application Note Rev. 6/92 #2203 Page 1 of 1