Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a survey that have a houseID and then a single field for each member that are included in the family as below
LOAD * INLINE [
AREA, HOUSEID, BORNYEARMONTH, BORNYEARMONTH2, BORNYEARMONTH3, BORNYEARMONTH4, BORNYEARMONTH5, BORNYEARMONTH6, BORNYEARMONTH7, BORNYEARMONTH8, BORNYEARMONTH9, BORNYEARMONTH10
A, 6357, 193606, , , , , , , , ,
A, 1934, 196803, , , , , , , , ,
B, 1524, 195508, , , , , , , , ,
D, 1004, 196810, 197001, 199108, 199211, 199311, 199509, 199905,200102 ,20051201 ,20070801
W, 10369, 194402, 194809, 198105, 198304, 198705, , , , ,
D, 1186, 194410, 195003, 198409, , , , , , ,
];
My question is how to count how many people that exists and how many that are under the age of 18 year? (I don´t have to take the month in consider here, only the year)
Can this be done in the script or only in a set expression? Please guide me in the right direction of how I can do this.
/Thanks
see the qvw.
see the qvw.
Hi,
The Alex expresion is correct but is better to use set analisys expresions whenever possible.
count({$<aage = {"< 18"}>} aage) +
count({$<bage = {"< 18"}>} bage) +
count({$<dage = {"< 18"}>} dage) +
count({$<eage = {"< 18"}>} eage) +
count({$<fage = {"< 18"}>} fage) +
count({$<gage = {"< 18"}>} gage) +
count({$<hage = {"< 18"}>} hage) +
count({$<iage = {"< 18"}>} iage) +
count({$<jage = {"< 18"}>} jage)