<?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 Simple Aggregation question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215639#M69055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, it worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jan 2010 08:21:38 GMT</pubDate>
    <dc:creator>m4u</dc:creator>
    <dc:date>2010-01-19T08:21:38Z</dc:date>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215633#M69049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have two tables - Invoices and Receipts. The Receips table has an InvoiceID field linking it to the invoice.&lt;/P&gt;&lt;P&gt;In the receipts table I have two fields - Applied to Invoice amount, and Total Receipt amount. For a single receipt, Total Receipt Amount=SUM(Applied to invoice) amount&lt;/P&gt;&lt;P&gt;There is a many to many relation here - meaning a single invoice can be related to multiple receipts and a single receipt may be related to multiple invoices.&lt;/P&gt;&lt;P&gt;I want to show a list of receipts in a datatable - receipt number and Total Receipt amount&lt;/P&gt;&lt;P&gt;If I were to do it in SQL, I would do SUM(TotalReceiptAmount) .... GROUP BY ReceiptID&lt;/P&gt;&lt;P&gt;In QV, If I do SUM(TotalReceiptAmount) I get the wrong figure since there are several lines for each receipt in my logical table. If I do SUM (DISTINCT TotalReceiptAmount) its better, but still not correct since if I have two receipts with same TotalReceiptAmount (for instance, 100), it will sum them as 100 instead of 100.&lt;/P&gt;&lt;P&gt;How can I specify QV to consider a single record from each ReceiptID?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 18:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215633#M69049</guid>
      <dc:creator>m4u</dc:creator>
      <dc:date>2010-01-18T18:37:40Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215634#M69050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sum(TOTAL &amp;lt;ReceiptID&amp;gt; TotalReceiptAmount)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sum total of TotalReceiptAmount per ReiceiptID (group by)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 20:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215634#M69050</guid>
      <dc:creator />
      <dc:date>2010-01-18T20:37:51Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215635#M69051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesnt work.. still showing duplicated totals&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 20:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215635#M69051</guid>
      <dc:creator>m4u</dc:creator>
      <dc:date>2010-01-18T20:46:40Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215636#M69052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably need to JOIN these tables first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 21:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215636#M69052</guid>
      <dc:creator />
      <dc:date>2010-01-18T21:06:19Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215637#M69053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are attached&lt;/P&gt;&lt;P&gt;I am attaching the reduced file - please take a look if you can. The drill down tab, the receipts table has only 1 receipt (as it should) but the total is wrong. The receipts table contains multiple records for the same receipt id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 21:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215637#M69053</guid>
      <dc:creator>m4u</dc:creator>
      <dc:date>2010-01-18T21:16:41Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215638#M69054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why do sum in that case. Just have the expression as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;B&gt;ReceiptTotal&lt;/B&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 22:10:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215638#M69054</guid>
      <dc:creator />
      <dc:date>2010-01-18T22:10:19Z</dc:date>
    </item>
    <item>
      <title>Simple Aggregation question</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215639#M69055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, it worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 08:21:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-Aggregation-question/m-p/215639#M69055</guid>
      <dc:creator>m4u</dc:creator>
      <dc:date>2010-01-19T08:21:38Z</dc:date>
    </item>
  </channel>
</rss>

