Page 1 of 1

Selecting Cases

Posted: September 3rd, 2019, 2:28 am
by Yihun_Shegnew
Dear forum,
I have single record but it extends to register family members as case. And for example I want to count female household members that will display for enumerators in Capi text before going to another section. The record isn’t multiple occurrence!
How to overcome this issues.
Thanks

Re: Selecting Cases

Posted: September 3rd, 2019, 6:16 am
by etuser
You can do the following,
Proc global
numeric hhcount;

proc hh_member
hhcount=0;
// Assume sex1 is the sex of the first person, sex2 sex of the e second person and so on
// Also assume 1=male and 2=female
if sex1 in 2 then hhcount =hhcount+1; Endif;
if sex2 in 2 then hhcount =hhcount+1; Endif;
if sex3 in 2 then hhcount =hhcount+1; Endif;
.
.
.
In the capi text you can write

Total number of Female household members are (%hhcount%)