Goodday, is there a way to count or show the caseid of the duplicate ID of a csdb?
For Example i have a csdb with 3 provinces on it and i want to count the duplicate case per provinces?
Thank you so much.
DUPLICATE CASES
-
- Posts: 1851
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: DUPLICATE CASES
You can use countcases: https://www.csprousers.org/help/CSPro/c ... ction.html
To specify duplicates, use CaseStatus.Duplicate: https://www.csprousers.org/help/CSPro/s ... ement.html
So something like:
To specify duplicates, use CaseStatus.Duplicate: https://www.csprousers.org/help/CSPro/s ... ement.html
So something like:
countcases(DICT(CaseStatus.Duplicate) where PROVINCE = 1);
Re: DUPLICATE CASES
thanks, there's an error
Invalid function call(external dictionary name expected)
i forgot something, if possible can it be counted this way?
for example
**************************001
**************************002
**************************003
**************************004
**************************005
**************************005-duplicate
**************************006
**************************006-duplicate
**************************006-duplicate
**************************007
**************************007-duplicate
**************************007-duplicate
**************************007-duplicate
Total duplicate is 6.
Duplicates has blank values.
Invalid function call(external dictionary name expected)
i forgot something, if possible can it be counted this way?
for example
**************************001
**************************002
**************************003
**************************004
**************************005
**************************005-duplicate
**************************006
**************************006-duplicate
**************************006-duplicate
**************************007
**************************007-duplicate
**************************007-duplicate
**************************007-duplicate
Total duplicate is 6.
Duplicates has blank values.
-
- Posts: 1851
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: DUPLICATE CASES
When you use countcases with a universe, you can only use external dictionaries. Presumably you are trying to count the cases in your main dictionary. This is not possible.
The code I posted earlier will tell you how many duplicates, but it will count AA, BB, AA, AA , AA as 4 duplicates, and AA, BB, AA, BB also as 4 duplicates. If you want to treat the first as 1 duplicate and the second as 2 duplicates, you can use the keylist function and fill a list with the duplicates. You can then process this list yourself to determine how many unique duplicates there are.
The code I posted earlier will tell you how many duplicates, but it will count AA, BB, AA, AA , AA as 4 duplicates, and AA, BB, AA, BB also as 4 duplicates. If you want to treat the first as 1 duplicate and the second as 2 duplicates, you can use the keylist function and fill a list with the duplicates. You can then process this list yourself to determine how many unique duplicates there are.