<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to group by age? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-group-by-age/m-p/247955#M94435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In my script I load a table that is BirthYearMonth (ex 198201) &lt;/P&gt;&lt;P&gt;In a chart I wish to group the people by age-intervall,&amp;nbsp; 0-12, 13-21 and 22-&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a other table I would like to use a diffrent age-intervall, 16-24, 25-&amp;gt; Is that possible and how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way to do this? I would also like it to change when we get a new year and relode the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jan 2012 19:34:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-03T19:34:24Z</dc:date>
    <item>
      <title>How to group by age?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-age/m-p/247955#M94435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In my script I load a table that is BirthYearMonth (ex 198201) &lt;/P&gt;&lt;P&gt;In a chart I wish to group the people by age-intervall,&amp;nbsp; 0-12, 13-21 and 22-&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a other table I would like to use a diffrent age-intervall, 16-24, 25-&amp;gt; Is that possible and how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way to do this? I would also like it to change when we get a new year and relode the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 19:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-age/m-p/247955#M94435</guid>
      <dc:creator />
      <dc:date>2012-01-03T19:34:24Z</dc:date>
    </item>
    <item>
      <title>How to group by age?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-age/m-p/247956#M94436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the best way is to create a new field in the script with a calculation of the age like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; age(&amp;nbsp;&amp;nbsp;&amp;nbsp; today() ,&amp;nbsp; makedate(left(Birthday,4) ,&amp;nbsp; right(Birthday,2) ,1))&amp;nbsp; as NbYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;age return the number of year between the 2 dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the chart add a new dimension :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&amp;nbsp; NbYear &amp;lt;= 12&amp;nbsp; , '0-12'&amp;nbsp; , if( NbYear &amp;lt; =21 ,&amp;nbsp; '13-21' ,&amp;nbsp; etc...)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that help&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 20:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-age/m-p/247956#M94436</guid>
      <dc:creator />
      <dc:date>2012-01-03T20:01:32Z</dc:date>
    </item>
  </channel>
</rss>

