Count Duplicates

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
SSantos_(Guest)
Posts: 1
Joined: Tue Oct 10, 2017 12:44 pm

Count Duplicates

Post by SSantos_(Guest) » Thu Mar 06, 2003 11:18 am

I would like to create a total field on a report that is a total of duplicates in the report. How do I do that?____Thanks in advance for your help,__Sarah

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Count Duplicates

Post by kfleming » Thu Mar 06, 2003 3:44 pm

Here is a simple example. __My database of names has:__Moe__Simon__Gene__Mary__Moe__Gene____Step 1 is to sort and group by name. This puts the records into this order.__Gene__Gene__Mary__Moe__Moe__Simon__Then create a total field called CNT that is a COUNT of the name field with a reset by name. Click the options button and make this total have an accumulation of Every and set it as pre-processed.__If we put this total on a record band, we then get__Gene 2__Gene 2__Mary 1__Moe 2__Moe 2__Simon 1____Then create a calculated field called DUPE with the expression:__CNT>1__This will return a logical true or false.____Finally create a total field called TOTDUPE. This will be a SUM of the calculated field DUPE with an accumulation of Once per Name and a reset at the grand level. Place this total on a summary band in the report and it will give you the number of duplicate names.____Kathleen__R&R Support

Post Reply