<?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 Pivot sum problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188411#M51673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response Mark, but that doesnt seem to work either&lt;/P&gt;&lt;P&gt;I used &lt;STRONG&gt;=aggr(sum([Tour Allocation]),[UniqueTourID])&lt;/STRONG&gt; which still returned value "80"&lt;/P&gt;&lt;P&gt;If I change to &lt;STRONG&gt;=aggr(max([Tour Allocation]),[UniqueTourID])&lt;/STRONG&gt; it returns value "40"&lt;/P&gt;&lt;P&gt;Would this imply I have some data duplication or linkage problem which is causing the record to be counted twice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jan 2011 15:36:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-27T15:36:25Z</dc:date>
    <item>
      <title>Pivot sum problem</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188409#M51671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem with =sum using a Pivot table.&lt;/P&gt;&lt;P&gt;When I use &lt;STRONG&gt;=sum([Tour Allocation])&lt;/STRONG&gt; the resultant value is double what it should be (80 instead of 40)&lt;/P&gt;&lt;P&gt;When I use &lt;STRONG&gt;=[Tour Allocation]&lt;/STRONG&gt; and put in some additional columns/rows fields to fully expand my data to the lowest level, the data is correct (40)&lt;/P&gt;&lt;P&gt;I have checked my source data, and dont appear to have any duplicate records - does anyone have any idea what is causing it to return as a duplicate value?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 14:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188409#M51671</guid>
      <dc:creator />
      <dc:date>2011-01-27T14:00:06Z</dc:date>
    </item>
    <item>
      <title>Pivot sum problem</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188410#M51672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds to me that you need to use the Aggr() function.&lt;/P&gt;&lt;P&gt;Say you have [Tour Allocation] values per field &lt;X&gt; and &lt;X&gt; can be either &lt;IMG alt="Angel" src="http://community.qlik.com/emoticons/emotion-13.gif" /&gt; or &lt;IMG alt="Beer" src="http://community.qlik.com/emoticons/emotion-22.gif" /&gt;.&lt;/X&gt;&lt;/X&gt;&lt;/P&gt;&lt;P&gt;Then using Aggr(Sum([Tour Allocation]),&lt;X&gt;) would aggregate the sum of field [Tour Allocation] per &lt;X&gt; value.&lt;/X&gt;&lt;/X&gt;&lt;/P&gt;&lt;P&gt;Or you need to use DISTINCT, because some value is taken several times to calculate the sum of field [Tour Allocation].&lt;/P&gt;&lt;P&gt;But perhaps it's best you show a bit more of your pivot table before we can give you the right answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 14:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188410#M51672</guid>
      <dc:creator />
      <dc:date>2011-01-27T14:14:53Z</dc:date>
    </item>
    <item>
      <title>Pivot sum problem</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188411#M51673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response Mark, but that doesnt seem to work either&lt;/P&gt;&lt;P&gt;I used &lt;STRONG&gt;=aggr(sum([Tour Allocation]),[UniqueTourID])&lt;/STRONG&gt; which still returned value "80"&lt;/P&gt;&lt;P&gt;If I change to &lt;STRONG&gt;=aggr(max([Tour Allocation]),[UniqueTourID])&lt;/STRONG&gt; it returns value "40"&lt;/P&gt;&lt;P&gt;Would this imply I have some data duplication or linkage problem which is causing the record to be counted twice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 15:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188411#M51673</guid>
      <dc:creator />
      <dc:date>2011-01-27T15:36:25Z</dc:date>
    </item>
    <item>
      <title>Pivot sum problem</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188412#M51674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Can you try the same expression in any Text Box or a straight chart instead of a Pivot...? It could be with the simple settings of the Pivot tableI guess, but if you use the same expression on a text object, and if it still returns 80 then please check the data model, otherwise its the settings around the Pivot.&lt;/P&gt;&lt;P&gt;Mama&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 16:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188412#M51674</guid>
      <dc:creator />
      <dc:date>2011-01-27T16:02:11Z</dc:date>
    </item>
    <item>
      <title>Pivot sum problem</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188413#M51675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mama for that tip - think it is pointing to a problem in my data model / source data which I now need to resolve!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 16:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-sum-problem/m-p/188413#M51675</guid>
      <dc:creator />
      <dc:date>2011-01-27T16:35:34Z</dc:date>
    </item>
  </channel>
</rss>

