<?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 Yet another Pivot Total issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203533#M60835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it works with some change: the problem here (guess) is that my two dimensions are not enough to uniquely distinguish the values (in the example I added the rownumber dimension but I don't want to display it). Therefore, I created an unique row ID for my dataset in the script and I modified my variable like that:&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;/P&gt;&lt;P&gt;&lt;/P&gt;vNewVar = sum(aggr(sum(ValueField), ID)) &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then I simply use $(vNewVar) in my expressions.Not sure it is the correct approach, but it seems to be working everywhere....&lt;/P&gt;&lt;P&gt;By the way, there is no need for this workaround within linear tables and "sum of rows" option. This behaviour is not straightforward to understand....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Apr 2010 16:16:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-06T16:16:33Z</dc:date>
    <item>
      <title>Yet another Pivot Total issue</title>
      <link>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203531#M60833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same old issue: Total value in the pivot below is obviously wrong.&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/-1343_sourceID:1343" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in this case, my dimensions are cyclic groups and my expression is actually a variable containing a sum(), because I want to use it in different objects. So, I couldn't figure out a working aggr() expression. Any ideas?&lt;/P&gt;&lt;P&gt;Generally speaking, I don't like this behaviour...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 13:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203531#M60833</guid>
      <dc:creator />
      <dc:date>2010-04-06T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Yet another Pivot Total issue</title>
      <link>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203532#M60834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;P&gt;Not sure how much of your expression is in the variable, but what I tend to do is to put the repeatable part in the variable and then wrap the Aggr function around it, this way you can use the variable in different objects.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Normal formula is =Sum ( Aggr ( Sum ( ValueField ) , Dim1, Dim2 ))&lt;/P&gt;&lt;P&gt;Create variable (vNewVar) that contains =Sum(ValueField)&lt;/P&gt;&lt;P&gt;Then change your expression to:&lt;/P&gt;&lt;P&gt;=Sum ( Aggr ( $(vNewVar ) , Dim1, Dim2 ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will this work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 15:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203532#M60834</guid>
      <dc:creator />
      <dc:date>2010-04-06T15:51:44Z</dc:date>
    </item>
    <item>
      <title>Yet another Pivot Total issue</title>
      <link>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203533#M60835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it works with some change: the problem here (guess) is that my two dimensions are not enough to uniquely distinguish the values (in the example I added the rownumber dimension but I don't want to display it). Therefore, I created an unique row ID for my dataset in the script and I modified my variable like that:&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;/P&gt;&lt;P&gt;&lt;/P&gt;vNewVar = sum(aggr(sum(ValueField), ID)) &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then I simply use $(vNewVar) in my expressions.Not sure it is the correct approach, but it seems to be working everywhere....&lt;/P&gt;&lt;P&gt;By the way, there is no need for this workaround within linear tables and "sum of rows" option. This behaviour is not straightforward to understand....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 16:16:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Yet-another-Pivot-Total-issue/m-p/203533#M60835</guid>
      <dc:creator />
      <dc:date>2010-04-06T16:16:33Z</dc:date>
    </item>
  </channel>
</rss>

