<?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: Help with subtotal in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256453#M396972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry that formula.. triples my result..&lt;/P&gt;&lt;P&gt;not sure why&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2016 02:29:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-14T02:29:31Z</dc:date>
    <item>
      <title>Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256451#M396970</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;im creating something with partial subtotal in a pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all the columns are using sum(aggr) and those works great in the subtotal section..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie -- sales&amp;nbsp; and cost&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a few columns that is the product of the other 2..&amp;nbsp;&amp;nbsp; total cost which is sales*cost...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the formula I have for that is =sales*cost.. works fine when filtered down..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when showing all types of clothing.. it gives me random numbers in the subtotal..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for the subtotal of sales and cost its correct cause it uses aggr?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas on how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146559_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 00:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256451#M396970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-14T00:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256452#M396971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you talking about 203057.5? How is that random? It is simply 250*813.23&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Sales*Cost, 2bfasefg, 2bc))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 02:00:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256452#M396971</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-14T02:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256453#M396972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry that formula.. triples my result..&lt;/P&gt;&lt;P&gt;not sure why&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 02:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256453#M396972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-14T02:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256454#M396973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 09:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256454#M396973</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-14T09:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256455#M396974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please see attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure im trying everything&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 16:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256455#M396974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-14T16:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256456#M396975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(Sum({&amp;lt;[2bfasefg],[2bc]&amp;gt;} sales) * Sum(Aggr(Sum(DISTINCT [2ldp]), [style])),[2bfasefg], [2bc]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146681_Capture.PNG" style="height: 139px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 16:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256456#M396975</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-14T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256457#M396976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perfect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can I ask why aggr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there are tons of aggr explainations or definition.. but its kinda confusing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would u be able to explain it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but thank u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;amazing fix&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2016 23:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256457#M396976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-14T23:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with subtotal</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256458#M396977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr is nothing buy an imaginary table which is then used to perform the outer aggregation for you. In your case Aggr() function creates an imaginary table with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[2bfasefg]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[2bc]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;[2bfasefg],[2bc]&amp;gt;} sales) * &lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum(Aggr(Sum(DISTINCT [2ldp]), [style]))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we have another Aggr() function within the expression, so QlikView creates another imaginary table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[style]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(DISTINCT [2ldp])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From here QlikView picks the Sum of Distinct values per style, 2bfasefg, 2bc and use that to multiple with the Sum of sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once that done, the final outside Aggr() is used to get the totals right. So it basically sums up the value on each row for you to show as a sub-total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if I explained this well enough or not. In my mind I know what it is doing, but it is difficult for me to put those thoughts in words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 03:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-subtotal/m-p/1256458#M396977</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-15T03:18:26Z</dc:date>
    </item>
  </channel>
</rss>

