<?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 Calculating population rates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-population-rates/m-p/1140177#M896790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a new user of Qlikview and first time poster. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble calculating unadjusted hospitalization rates (per 100,000). I have unit record data for episodes of care at a hospital to count up for the numerator. These unit records include information on year of admission, age at admission, sex and area of residence as well as a bunch of clinical variables. I have populations for each year, area of residence (about 500 of them), age and sex to sum up for the denominator.&amp;nbsp; Here is part of my load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADMISSIONS:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADM_YEAR AS YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AREA_4DIGITCODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONDITION,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNIQUE_ID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QVDdatafile(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POPULATIONS:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AREA_4DIGITCODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Population&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PopData.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially I was using the following expressions to calculate (1) number of hospitalizations, (2) population and (3) crude rate of hospitalization per 100,000 population:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(UNIQUE_ID)&lt;/P&gt;&lt;P&gt;(2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Population)&lt;/P&gt;&lt;P&gt;(3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100000*COUNT(UNIQUE_ID)/SUM(Population)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results are fine if I make NO selections, such as for CONDITION or a specific YEAR. The Sum(population) correctly takes every population &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I want the rate of hospitalization rate for women who had a stroke in 2007, select 'Female' is a SEX item box, select 'Stroke' in a CONDITION item box and '2007' in a YEAR item box, only the populations in areas of residence where there was at least 1 stroke are summed. I understand and accept why this is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspected i need a Set Analysis and tried this: COUNT(UNIQUE_ID)/SUM( {$&amp;lt;SA2_4DIGITCODE=&amp;gt; } Population) without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i summary I want to calculate hospitalization rates for specific conditions/diagnoses within certain populations, such as Males in 2010, or Females in 2009. I would also like to get rates for groups of the AREA_4DIGITCODE, that we are calling REGIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please direct me? I'm also open to suggestions on a better data model, though I can't give too much information about the data itself due to sensitivity of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Calculating population rates</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-population-rates/m-p/1140177#M896790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a new user of Qlikview and first time poster. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble calculating unadjusted hospitalization rates (per 100,000). I have unit record data for episodes of care at a hospital to count up for the numerator. These unit records include information on year of admission, age at admission, sex and area of residence as well as a bunch of clinical variables. I have populations for each year, area of residence (about 500 of them), age and sex to sum up for the denominator.&amp;nbsp; Here is part of my load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADMISSIONS:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADM_YEAR AS YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AREA_4DIGITCODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONDITION,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNIQUE_ID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QVDdatafile(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POPULATIONS:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YEAR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AREA_4DIGITCODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Population&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PopData.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially I was using the following expressions to calculate (1) number of hospitalizations, (2) population and (3) crude rate of hospitalization per 100,000 population:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(UNIQUE_ID)&lt;/P&gt;&lt;P&gt;(2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Population)&lt;/P&gt;&lt;P&gt;(3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100000*COUNT(UNIQUE_ID)/SUM(Population)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results are fine if I make NO selections, such as for CONDITION or a specific YEAR. The Sum(population) correctly takes every population &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I want the rate of hospitalization rate for women who had a stroke in 2007, select 'Female' is a SEX item box, select 'Stroke' in a CONDITION item box and '2007' in a YEAR item box, only the populations in areas of residence where there was at least 1 stroke are summed. I understand and accept why this is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspected i need a Set Analysis and tried this: COUNT(UNIQUE_ID)/SUM( {$&amp;lt;SA2_4DIGITCODE=&amp;gt; } Population) without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i summary I want to calculate hospitalization rates for specific conditions/diagnoses within certain populations, such as Males in 2010, or Females in 2009. I would also like to get rates for groups of the AREA_4DIGITCODE, that we are calling REGIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please direct me? I'm also open to suggestions on a better data model, though I can't give too much information about the data itself due to sensitivity of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-population-rates/m-p/1140177#M896790</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
  </channel>
</rss>

