Selecting Cases

Discussions about CSEntry
Post Reply
Yihun_Shegnew
Posts: 25
Joined: November 30th, 2017, 11:56 am

Selecting Cases

Post 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
etuser
Posts: 85
Joined: September 3rd, 2019, 5:57 am

Re: Selecting Cases

Post 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%)
Post Reply