2 Replies Latest reply: Sep 21, 2012 8:29 AM by Gregorio Zerpa RSS

    How to count this in script?

    Göran Hofstedt

      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