<?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 Re: Aggregating duplicate values over periods in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530300#M107791</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/68009"&gt;@dana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I can tell number of patients is correct. The total adds up to 383 in each case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We dont really see granularity of your key field used to link both tables but I assume it is likely including month and department so taking that into consideration we can see that it is possible that for some months you may not have a record with particular disease.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to have total of patients regardless of disease then your expression may need to look like:&lt;/P&gt;&lt;P&gt;Sum(Total &amp;lt;Disease&amp;gt; Patient)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Lech&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2025 06:17:31 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2025-09-10T06:17:31Z</dc:date>
    <item>
      <title>Aggregating duplicate values over periods</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530299#M107790</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is an updated post about an issue with dealing with duplicate values, since I couldn't edit the original one.&lt;/P&gt;&lt;P&gt;I have simplified my previous post..&lt;BR /&gt;I created 2 tables with monthly data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_0-1757482689207.png" style="width: 425px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183544iB66BE8431E4759EA/image-dimensions/425x213?v=v2" width="425" height="213" role="button" title="dana_0-1757482689207.png" alt="dana_0-1757482689207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;FirstInfected_Monthly table has the fields Year-Month, Disease, Department,&lt;/P&gt;&lt;P&gt;Hospitalization_Monthly has Patients count in a department (all of them, not only the sick ones)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_1-1757482996937.png" style="width: 312px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183545iD5C1DC8E3A3C902A/image-dimensions/312x103?v=v2" width="312" height="103" role="button" title="dana_1-1757482996937.png" alt="dana_1-1757482996937.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the UI,&amp;nbsp; when a table includes the field Year-Month and a year is selected, the Patients count display as expected: the same number in a department, regardless of the disease:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_2-1757483239892.png" style="width: 577px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183546i7F244A2C8FE84B63/image-dimensions/577x182?v=v2" width="577" height="182" role="button" title="dana_2-1757483239892.png" alt="dana_2-1757483239892.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when the Year-Month is removed, instead of showing the total yearly number for each department (383),&lt;/P&gt;&lt;P&gt;the value is aggregated by Disease:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_3-1757483490360.png" style="width: 588px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183547iC0F41526C7AD4FC3/image-dimensions/588x231?v=v2" width="588" height="231" role="button" title="dana_3-1757483490360.png" alt="dana_3-1757483490360.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried various AGGR and Total options, but nothing worked..&lt;BR /&gt;I attach sample data, hoping for some help..&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 05:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530299#M107790</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2025-09-10T05:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating duplicate values over periods</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530300#M107791</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/68009"&gt;@dana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I can tell number of patients is correct. The total adds up to 383 in each case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We dont really see granularity of your key field used to link both tables but I assume it is likely including month and department so taking that into consideration we can see that it is possible that for some months you may not have a record with particular disease.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to have total of patients regardless of disease then your expression may need to look like:&lt;/P&gt;&lt;P&gt;Sum(Total &amp;lt;Disease&amp;gt; Patient)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Lech&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 06:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530300#M107791</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2025-09-10T06:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating duplicate values over periods</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530304#M107792</link>
      <description>&lt;P&gt;Hi Lech,&lt;/P&gt;&lt;P&gt;I did try using TOTAL, but it didn't work as expected:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_0-1757486011507.png" style="width: 505px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183548i0F21073250619090/image-dimensions/505x160?v=v2" width="505" height="160" role="button" title="dana_0-1757486011507.png" alt="dana_0-1757486011507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 06:35:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530304#M107792</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2025-09-10T06:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating duplicate values over periods</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530327#M107796</link>
      <description>&lt;P&gt;Sorry, my bad. What do you get if you just do&amp;nbsp;&lt;SPAN&gt;Sum(Total&amp;nbsp; Patient)?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;is that what you expect? Doing it with "Total" will depend on what other dimensions you want this measure to work with. in your chart object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lech_Miszkiewicz_2-1757490813999.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183557iCADDCB22DEE0046A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lech_Miszkiewicz_2-1757490813999.png" alt="Lech_Miszkiewicz_2-1757490813999.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 07:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530327#M107796</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2025-09-10T07:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating duplicate values over periods</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530331#M107797</link>
      <description>&lt;P&gt;Hi Lech,&lt;/P&gt;&lt;P&gt;Yes! you nailed it!&lt;/P&gt;&lt;P&gt;I had to use total by Department. Since Total Patients only will be calculated for all the departments..&lt;/P&gt;&lt;P&gt;Thank you for your kind help!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dana_1-1757492275069.png" style="width: 1169px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183559i9F0F962C7B972B4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dana_1-1757492275069.png" alt="dana_1-1757492275069.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 08:18:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-duplicate-values-over-periods/m-p/2530331#M107797</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2025-09-10T08:18:04Z</dc:date>
    </item>
  </channel>
</rss>

