<?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 Subtotal in pivot issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subtotal-in-pivot-issue/m-p/127035#M19246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a subtotal issue, and this cause my [Total] column also not to calculate.&lt;/P&gt;&lt;P&gt;I have a min and max perc that indicate what the rep incentive must be for that line in column [Focus Weighting] – this is a fixed amount. If perc is not in this min and max this value must be 0. &lt;/P&gt;&lt;P&gt;The payout is on a brand level and not on a pack level – meaning you get ‘brand1’ under this you get ‘brand1 pack 30’s’ and ‘brand1 pack 40’s’&lt;/P&gt;&lt;P&gt;The reps work in a Territory that is my first dimension. In properties/presentation I did a partial sum on Territory and Rep Name dimensions where I ticked the checkbox.&lt;/P&gt;&lt;P&gt;I read allot of posts on Aggr on subtotals and tried implementing this, but it also did not work.&lt;/P&gt;&lt;P&gt;In picture the [Focus Weighting] for this Territory must be 120 and the Total for Territory must be 180&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate help on these subtotals and total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my Expression for&amp;nbsp; [Focus Weighting]&amp;nbsp; column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([Qualify])='YES',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([FOCUS BRANDS])='BRAND 10%', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6100', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6200', '#,##0%'),sum (DISTINCT num('50', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6200', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6300', '#,##0%'),sum (DISTINCT num('60', '#,##0'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,'0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([FOCUS BRANDS])='10% COMBINED', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6100', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6200', '#,##0%'), sum (DISTINCT num('70', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6200', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6300', '#,##0%'), sum (DISTINCT num('80', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,'0'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;),'Dont Qualify')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="subtotal.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213547_subtotal.png" style="height: 257px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank so much&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Louw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2018 03:59:50 GMT</pubDate>
    <dc:creator>louwriet</dc:creator>
    <dc:date>2018-09-14T03:59:50Z</dc:date>
    <item>
      <title>Subtotal in pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Subtotal-in-pivot-issue/m-p/127035#M19246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a subtotal issue, and this cause my [Total] column also not to calculate.&lt;/P&gt;&lt;P&gt;I have a min and max perc that indicate what the rep incentive must be for that line in column [Focus Weighting] – this is a fixed amount. If perc is not in this min and max this value must be 0. &lt;/P&gt;&lt;P&gt;The payout is on a brand level and not on a pack level – meaning you get ‘brand1’ under this you get ‘brand1 pack 30’s’ and ‘brand1 pack 40’s’&lt;/P&gt;&lt;P&gt;The reps work in a Territory that is my first dimension. In properties/presentation I did a partial sum on Territory and Rep Name dimensions where I ticked the checkbox.&lt;/P&gt;&lt;P&gt;I read allot of posts on Aggr on subtotals and tried implementing this, but it also did not work.&lt;/P&gt;&lt;P&gt;In picture the [Focus Weighting] for this Territory must be 120 and the Total for Territory must be 180&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate help on these subtotals and total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my Expression for&amp;nbsp; [Focus Weighting]&amp;nbsp; column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([Qualify])='YES',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([FOCUS BRANDS])='BRAND 10%', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6100', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6200', '#,##0%'),sum (DISTINCT num('50', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6200', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6300', '#,##0%'),sum (DISTINCT num('60', '#,##0'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,'0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if (upper([FOCUS BRANDS])='10% COMBINED', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6100', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6200', '#,##0%'), sum (DISTINCT num('70', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(num([90% Achieved], '#,##0%') &amp;gt;= num('0.6200', '#,##0%') and num([90% Achieved], '#,##0%') &amp;lt;= num('0.6300', '#,##0%'), sum (DISTINCT num('80', '#,##0')),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,'0'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;),'Dont Qualify')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="subtotal.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213547_subtotal.png" style="height: 257px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank so much&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Louw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 03:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtotal-in-pivot-issue/m-p/127035#M19246</guid>
      <dc:creator>louwriet</dc:creator>
      <dc:date>2018-09-14T03:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal in pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Subtotal-in-pivot-issue/m-p/127036#M19247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe you have used for grand total of your expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'total of expression'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the expression can't be evaluated like this because of if (there is not an operator like sum)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so try to change by 'sum of rows' to have grand total&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:36:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtotal-in-pivot-issue/m-p/127036#M19247</guid>
      <dc:creator>ogautier62</dc:creator>
      <dc:date>2018-09-14T09:36:49Z</dc:date>
    </item>
  </channel>
</rss>

