<?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 Total sum in Pivot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150056#M589956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I've been reading the forum all night long, now I'm tired so maybe someone can help me out with this pivot table. I can't get the total sum to calculate right. The sum should be 304065.&lt;/P&gt;&lt;P&gt;I Use following code to do the calculation. I tried to use the aggr function but I get the same result &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I would be more than happy if someone could give me a hint. Thanks!&lt;/P&gt;&lt;P&gt;=&lt;B&gt;IF&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;&amp;gt;'',&lt;B&gt;SUM&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;*&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-327_sourceID:327" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2009 03:12:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-23T03:12:51Z</dc:date>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150056#M589956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I've been reading the forum all night long, now I'm tired so maybe someone can help me out with this pivot table. I can't get the total sum to calculate right. The sum should be 304065.&lt;/P&gt;&lt;P&gt;I Use following code to do the calculation. I tried to use the aggr function but I get the same result &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I would be more than happy if someone could give me a hint. Thanks!&lt;/P&gt;&lt;P&gt;=&lt;B&gt;IF&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;&amp;gt;'',&lt;B&gt;SUM&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;*&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-327_sourceID:327" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 03:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150056#M589956</guid>
      <dc:creator />
      <dc:date>2009-07-23T03:12:51Z</dc:date>
    </item>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150057#M589957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H4&gt;Try changing your calculation:&lt;/H4&gt;&lt;H4&gt;from this:&lt;BR /&gt;&lt;/H4&gt;&lt;H4&gt;&lt;B&gt;IF&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;&amp;gt;'',&lt;B&gt;SUM&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;*&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;))&lt;/H4&gt;&lt;H4&gt;To this:&lt;BR /&gt;&lt;/H4&gt;&lt;H4&gt;Sum(If([Curr] &amp;gt;"", [Curr]*[Unddel_ordervalue],[Unddel_ordervalue]))&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ed&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 03:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150057#M589957</guid>
      <dc:creator />
      <dc:date>2009-07-23T03:24:16Z</dc:date>
    </item>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150058#M589958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunatly, that was not the solution, I think it has to be someting with the aggr function....&lt;/P&gt;&lt;P&gt;Well the result from your solution (depending if I use '' or "":&lt;/P&gt;&lt;P&gt;Thanks anyway!&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7343.Undelivered_5F00_orders1.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/7343.Undelivered_5F00_orders1.png" /&gt;&lt;/A&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/8726.Undelivered_5F00_orders2.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/8726.Undelivered_5F00_orders2.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 03:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150058#M589958</guid>
      <dc:creator />
      <dc:date>2009-07-23T03:53:17Z</dc:date>
    </item>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150059#M589959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi danne31,&lt;/P&gt;&lt;P&gt;There is a chapter on this in the reference manual. "Sum of rows in a pivot table" or something like that in the back somewhere.&lt;/P&gt;&lt;P&gt;The if statement in the expression can make the dimension independent total be something else than the sum of rows. Still correct, but not what one would like to see. In that case you can aggregate the sums for each dimension value and then sum these up for the total.&lt;/P&gt;&lt;P&gt;if the original expression was: =&lt;B&gt;IF&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;&amp;gt;'',&lt;B&gt;SUM&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;*&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;))&lt;/P&gt;&lt;P&gt;You should be able to write: =sum(aggr(&lt;B&gt;IF&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;&amp;gt;'',&lt;B&gt;SUM&lt;/B&gt;(&lt;B&gt;[Curr]&lt;/B&gt;*&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;),&lt;B&gt;Sum&lt;/B&gt;(&lt;B&gt;[Unddel_ordervalue]&lt;/B&gt;)), Kund_beskrivning))&lt;/P&gt;&lt;P&gt;However, I see that you have more than one dimension hidden under the pivot expansion icons so you might want to add these dimension fields to the aggr function. This is all better explained in the reference manual so I suggest you look up the chapter I'm referring to.&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Johannes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 09:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150059#M589959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-23T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150060#M589960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johannes!&lt;/P&gt;&lt;P&gt;Perfect! Thanks a lot, it works just the way i want to!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 18:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150060#M589960</guid>
      <dc:creator />
      <dc:date>2009-07-23T18:07:43Z</dc:date>
    </item>
    <item>
      <title>Total sum in Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150061#M589961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Johannes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been pulling my hair out over this for almost 10 hours straight.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 10:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-sum-in-Pivot/m-p/150061#M589961</guid>
      <dc:creator />
      <dc:date>2010-03-31T10:37:09Z</dc:date>
    </item>
  </channel>
</rss>

