<?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: Sum total in pivot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801010#M534250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey, can you upload a sample to make tests?&lt;/P&gt;&lt;P&gt;Anyway, can you try to change the order of the first aggr, original and floor has:&lt;/P&gt;&lt;P&gt;"Leeftijdscategorie_Afspiegelen, UitwisselbareFunctie" &lt;/P&gt;&lt;P&gt;but the global aggr has this order switched:&lt;/P&gt;&lt;P&gt;"UitwisselbareFunctie, Leeftijdscategorie_Afspiegelen"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Feb 2015 09:58:27 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-02-13T09:58:27Z</dc:date>
    <item>
      <title>Sum total in pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801009#M534249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help to get a sum total (straight table like) in a Pivot table. I allready enabled the "Show partial sum" but this won't give the right number of totals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the solution is not easy and I think it needs some advanced expression skills.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Situation:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I use an input field to categorise fields&lt;/P&gt;&lt;P&gt;&lt;IMG alt="inputfield.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78021_inputfield.JPG" style="height: 102px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;These fields I use as dimension in the following tables:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="result.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/78022_result.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;In the red square I fill in a number (inputsum). This number will be devided over the categories in the first tabel. The second table shows the same numbers, only rounded. The Third table shows the remainder of the original number minus the rounded number. This table is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It shows the total of the remains of the three categorised field values (test). The expression i use is:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14238201130258616 jive_text_macro jive_macro_code" jivemacro_uid="_14238201130258616" modifiedtitle="true"&gt;
&lt;P&gt;SUM( AGGR(&lt;/P&gt;
&lt;P&gt;//Original calculation&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (sum(Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sum(Counter)/sum(TOTAL &amp;lt;UitwisselbareFunctie&amp;gt; Counter)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sum(TOTAL &amp;lt;UitwisselbareFunctie&amp;gt; ReductieInputFunctie), Leeftijdscategorie_Afspiegelen, UitwisselbareFunctie))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -&lt;/P&gt;
&lt;P&gt;//Minus rounded number&lt;/P&gt;
&lt;P&gt;&amp;nbsp; floor(sum(Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sum(Counter)/sum(TOTAL &amp;lt;UitwisselbareFunctie&amp;gt; Counter)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sum(TOTAL &amp;lt;UitwisselbareFunctie&amp;gt; ReductieInputFunctie), Leeftijdscategorie_Afspiegelen, UitwisselbareFunctie))))&lt;/P&gt;
&lt;P&gt;, UitwisselbareFunctie, Leeftijdscategorie_Afspiegelen))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone can help me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 09:40:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801009#M534249</guid>
      <dc:creator />
      <dc:date>2015-02-13T09:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sum total in pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801010#M534250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey, can you upload a sample to make tests?&lt;/P&gt;&lt;P&gt;Anyway, can you try to change the order of the first aggr, original and floor has:&lt;/P&gt;&lt;P&gt;"Leeftijdscategorie_Afspiegelen, UitwisselbareFunctie" &lt;/P&gt;&lt;P&gt;but the global aggr has this order switched:&lt;/P&gt;&lt;P&gt;"UitwisselbareFunctie, Leeftijdscategorie_Afspiegelen"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 09:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801010#M534250</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-13T09:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sum total in pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801011#M534251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben, I changed it but It didn't change anything. I will try to create a sample file, but it is complicated so give me some time &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, 13 Feb 2015 13:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-total-in-pivot/m-p/801011#M534251</guid>
      <dc:creator />
      <dc:date>2015-02-13T13:24:50Z</dc:date>
    </item>
  </channel>
</rss>

