<?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: Multiple Totals on Dataset in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537947#M548725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jerem1234,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perfect....that works wonderfully. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jan 2014 17:30:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-20T17:30:47Z</dc:date>
    <item>
      <title>Multiple Totals on Dataset</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537945#M548723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a PivotTable Chart with dimension &lt;STRONG&gt;Year, Month, Fund, Sector&lt;/STRONG&gt; and expression of AvgCapLong and AvgCapShort. I want to show partial sums at the Year, Month, Fund and Sector level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the Expression for AvgCapLong is simply SUM(AvgCapLong). I calculate the AvgCap in the database, hence it's SUM rather than Avg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to see the following partial sums:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the &lt;STRONG&gt;Sector&lt;/STRONG&gt; level (dimensionality=4) : SUM(AvgCapLong) - This works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the &lt;STRONG&gt;Fund&lt;/STRONG&gt; level (dimensionality=3): SUM(AvgCapLong) - This works fine also. This is the Sum of average across sectors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the &lt;STRONG&gt;Month&lt;/STRONG&gt; Level (dimensionality=2): SUM(AvgCapLong) - Perfect. This is the Sum across Funds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the &lt;STRONG&gt;Year&lt;/STRONG&gt; level (dimensionality=0): SUM(AvgCapLong). Problem. I want the AVERAGE of the Monthly Sum of AvgCapLong. The Average should be the average of monthly sum(avgCapLong). How do I put this in the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried - but it didn't like the expression.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;IF(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Dimensionality&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Dimensionality&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=2}&amp;gt; } SUM(ACR_AvgCap_DALong))/1000000, Sum(ACR_AvgCap_DALong)/1000000) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537945#M548723</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-20T16:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Totals on Dataset</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537946#M548724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You'll need to use the aggr function like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Dimensionality&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;()=0, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;avg(aggr(sum(ACR_AvgCap_DALong), Month))/1000000,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(ACR_AvgCap_DALong)/1000000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aggr will aggregate based on your field Month. So it will sum ACR for each month, then the avg will take the average of all those sums.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537946#M548724</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-01-20T16:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Totals on Dataset</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537947#M548725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jerem1234,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perfect....that works wonderfully. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 17:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Totals-on-Dataset/m-p/537947#M548725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-20T17:30:47Z</dc:date>
    </item>
  </channel>
</rss>

