<?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: wrong aggr sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458507#M1164568</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 have table with data from 2 different types of document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you look exel file on goog_5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice has onli &lt;STRONG&gt;2 rows&lt;/STRONG&gt; from good_5: good_5 with &lt;STRONG&gt;2,265&lt;/STRONG&gt;&amp;nbsp; and good_5 with &lt;STRONG&gt;2,84&lt;/STRONG&gt;. Sum Quantity_in_invoice = &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,265&lt;/STRONG&gt; + &lt;STRONG&gt;2,84 = &lt;/STRONG&gt;&lt;STRONG&gt;5.105&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and the same position in document has &lt;STRONG&gt;3 rows&lt;/STRONG&gt;: 5 with &lt;STRONG&gt;0,006 &lt;/STRONG&gt; and good_5 with &lt;STRONG&gt;2,265&lt;/STRONG&gt; and good_5 with &lt;STRONG&gt;2,834&lt;/STRONG&gt; Sum Quantity_in_deliver = &lt;STRONG&gt;0,006 &lt;/STRONG&gt;+&amp;nbsp; &lt;STRONG&gt;2,265 + &lt;/STRONG&gt;&lt;STRONG&gt;2,834 = 5.105&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join 2 documents give me 6 rows&lt;/P&gt;&lt;P&gt;and when i use aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice) it give me right grouping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i use sum(distinct Quantity_in_deliver) sum by Customer_A became = 43.79 when right sumis 43.8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see problem with data and think what if a can put all rows from aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice) into temp dimention and then sum all elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it posseble?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2012 13:26:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-22T13:26:08Z</dc:date>
    <item>
      <title>wrong aggr sum</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458505#M1164564</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 have data table and exprasion :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this table is good and all data has right grouping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i try to sum my aggragated data like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it dosent work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please need help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sea atachments&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 12:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458505#M1164564</guid>
      <dc:creator />
      <dc:date>2012-11-22T12:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr sum</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458506#M1164566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do a sum(distinct Quantity_in_deliver) you'll get the total you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 13:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458506#M1164566</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-22T13:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr sum</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458507#M1164568</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 have table with data from 2 different types of document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you look exel file on goog_5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice has onli &lt;STRONG&gt;2 rows&lt;/STRONG&gt; from good_5: good_5 with &lt;STRONG&gt;2,265&lt;/STRONG&gt;&amp;nbsp; and good_5 with &lt;STRONG&gt;2,84&lt;/STRONG&gt;. Sum Quantity_in_invoice = &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,265&lt;/STRONG&gt; + &lt;STRONG&gt;2,84 = &lt;/STRONG&gt;&lt;STRONG&gt;5.105&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and the same position in document has &lt;STRONG&gt;3 rows&lt;/STRONG&gt;: 5 with &lt;STRONG&gt;0,006 &lt;/STRONG&gt; and good_5 with &lt;STRONG&gt;2,265&lt;/STRONG&gt; and good_5 with &lt;STRONG&gt;2,834&lt;/STRONG&gt; Sum Quantity_in_deliver = &lt;STRONG&gt;0,006 &lt;/STRONG&gt;+&amp;nbsp; &lt;STRONG&gt;2,265 + &lt;/STRONG&gt;&lt;STRONG&gt;2,834 = 5.105&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join 2 documents give me 6 rows&lt;/P&gt;&lt;P&gt;and when i use aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice) it give me right grouping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i use sum(distinct Quantity_in_deliver) sum by Customer_A became = 43.79 when right sumis 43.8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see problem with data and think what if a can put all rows from aggr(sum(Quantity_in_deliver),Affilietedid,goodsid,amount_in_invoice) into temp dimention and then sum all elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it posseble?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 13:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458507#M1164568</guid>
      <dc:creator />
      <dc:date>2012-11-22T13:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr sum</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458508#M1164570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm yeah, a simple distinct Quantity_in_invoice isn't enough. It needs to take some dimensions into account. &lt;/P&gt;&lt;P&gt;This seems to work: &lt;/P&gt;&lt;P&gt;sum(aggr(sum(DISTINCT Quantity_in_invoice),goods,invoice_number,bg_t,Affilietedid, Customer))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 13:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458508#M1164570</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-22T13:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr sum</title>
      <link>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458509#M1164572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you again &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2012 05:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/wrong-aggr-sum/m-p/458509#M1164572</guid>
      <dc:creator />
      <dc:date>2012-11-23T05:49:13Z</dc:date>
    </item>
  </channel>
</rss>

