<?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 Not expected totals on the pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199667#M58504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In straight table, the total is calculated as "total of the expression".&lt;/P&gt;&lt;P&gt;To have the total of the column, you can do like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(aggr(&lt;EM&gt;value&lt;/EM&gt;,Dimension))&lt;/P&gt;&lt;P&gt;For you, I think:&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=&amp;gt;} aggr([Customer Weight],Product))&lt;BR /&gt;/&lt;BR /&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=, [Product Group]=&amp;gt;} TOTAL &amp;lt;"$(=GetCurrentField(Wholesaler))"&amp;gt; aggr([Customer Weight],Product))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Feb 2011 14:17:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-03T14:17:48Z</dc:date>
    <item>
      <title>Not expected totals on the pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199666#M58503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a pivot table with products (y) and wholesalers (x) with percentage-values.&lt;BR /&gt;But Qlikview is putting the total on 100%, but it isn't ...&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Wholesaler A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;35%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;2%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product C&lt;/TD&gt;&lt;TD&gt;5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product D&lt;/TD&gt;&lt;TD&gt;1%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product E&lt;/TD&gt;&lt;TD&gt;7%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product E&lt;/TD&gt;&lt;TD&gt;58%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;100%&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;It says total 100% at the bottom, where I expected &lt;STRONG&gt;108%&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;My expression for the percentages are as follow&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;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=&amp;gt;} [Customer Weight])&lt;BR /&gt;/&lt;BR /&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=, [Product Group]=&amp;gt;} TOTAL &amp;lt;"$(=GetCurrentField(Wholesaler))"&amp;gt; [Customer Weight])&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sincerely Yours,&lt;BR /&gt;Vincent Hayward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 14:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199666#M58503</guid>
      <dc:creator>vhayward</dc:creator>
      <dc:date>2011-02-03T14:09:31Z</dc:date>
    </item>
    <item>
      <title>Not expected totals on the pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199667#M58504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In straight table, the total is calculated as "total of the expression".&lt;/P&gt;&lt;P&gt;To have the total of the column, you can do like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(aggr(&lt;EM&gt;value&lt;/EM&gt;,Dimension))&lt;/P&gt;&lt;P&gt;For you, I think:&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=&amp;gt;} aggr([Customer Weight],Product))&lt;BR /&gt;/&lt;BR /&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=, [Product Group]=&amp;gt;} TOTAL &amp;lt;"$(=GetCurrentField(Wholesaler))"&amp;gt; aggr([Customer Weight],Product))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 14:17:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199667#M58504</guid>
      <dc:creator />
      <dc:date>2011-02-03T14:17:48Z</dc:date>
    </item>
    <item>
      <title>Not expected totals on the pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199668#M58505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I have fixed this with the following statement:&lt;/P&gt;&lt;P&gt;=sum(aggr(&lt;BR /&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=&amp;gt;} [Customer Weight])&lt;BR /&gt;/&lt;BR /&gt;sum( {$&amp;lt;QuarterID={"&amp;lt;=$(=max(QuarterID))&amp;gt;=$(=max(QuarterID)-3)"}, [Year-Quarter]=, [Product Group]=&amp;gt;} TOTAL &amp;lt;"$(=GetCurrentField(Wholesaler))"&amp;gt; [Customer Weight]),&lt;BR /&gt;[Product Group],&lt;BR /&gt;"$(=GetCurrentField(Wholesaler))"&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;Or are there more options to fix this one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 14:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-expected-totals-on-the-pivot-table/m-p/199668#M58505</guid>
      <dc:creator>vhayward</dc:creator>
      <dc:date>2011-02-03T14:34:11Z</dc:date>
    </item>
  </channel>
</rss>

