13 Replies Latest reply: Sep 29, 2015 1:53 AM by Sasidhar Parupudi RSS

    Missing age groups

    Pearl Ometan

      I am designing a QV app using data that I loaded in QV from an excel spreadsheet. The spreadsheet lists individuals with their ages. I tried to create age groups in QV scripting using the  age field and "if" statement but some of the individuals in the data were not assigned to any age group even though their age is included in the data both in QV and in the excel spreadsheet. How do I fix these missing age groups? could there be something wrong with the scripting? the script loaded fine.

      LOAD *,

      if([CMED Age] >20, 'Over 20',

      if([CMED Age] <= 20 and [CMED Age] >= 16, '16 - 20',

      if([CMED Age] <= 15 and [CMED Age] >= 11, '11 - 15',

      if([CMED Age] <= 10 and [CMED Age] >= 6, '6 - 10',

      if([CMED Age] <= 5 and [CMED Age] >= 4, '4 - 5',

      if([CMED Age] <= 3 and [CMED Age] >= 1, '1 - 3',

      if([CMED Age] < 1, 'Under 1'))))))) as [CMED Age_Group];

       

      Thanks