<?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: Using AGGR function to sum rows in a pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972827#M967208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small qlikview document that demonstrates the problem. See this document for more information: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1290" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2015 05:41:54 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-10-01T05:41:54Z</dc:date>
    <item>
      <title>Using AGGR function to sum rows in a pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972826#M967207</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;I haven't posted here before so hope that I can provide the correct information to help solve my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variance analysis in Qlikview.&amp;nbsp; It allows the period actual result to be compared to the latest forecast and last year.&amp;nbsp; I am trying to split the variances into a simple rate and volume number.Each line of data that pulls into the table is unique, based on the dimension of StatementAccountNumber and PartNumber. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue that I am having is that I want to show the total of the individual expressions in a summary table.&amp;nbsp; The individual expressions calculate correctly, and I can get a correct total by using the "Sum of Rows" function in a simple table.&amp;nbsp; I now want to get the total for this to pull into a summary table on another sheet.&amp;nbsp; I do not believe that you can link totals from one QV sheet to another (like in excel).&amp;nbsp; After reading several blogs on this I believe that I have to use an AGGR function outlined below as, if I do not, then the expression calculates on the totals and does not equal the detail sheet (originally I had the individual data in a pivot table and had the same issue).&amp;nbsp; The below function is not calculating the correct figure either and I am not sure how to correct this.&amp;nbsp; I assumed that as the combination of StatementAccountNumber and PartNumber were unique, it would calculate each one individually and then add them together (as on the simple table).&amp;nbsp; I may be completely mis-understanding this function so any help would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;sum (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValueInKG&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = 0,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Scenario&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={Actual}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DirectLabourCostOfSale&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;BR /&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DirectLabourCostOfSale&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValueInKG&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000))&lt;BR /&gt;* &lt;BR /&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Scenario&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {Actual}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValueInKG&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000)-(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValueInKG&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/1000))))) &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatementAccountNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PartNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 18:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972826#M967207</guid>
      <dc:creator />
      <dc:date>2015-09-30T18:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using AGGR function to sum rows in a pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972827#M967208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small qlikview document that demonstrates the problem. See this document for more information: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1290" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 05:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972827#M967208</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-01T05:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using AGGR function to sum rows in a pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972828#M967209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have outlined what is needed in the excel attachment below (picture of data below) as I am not confident enough around security of data to attach the QV document. The expression that I am working on is for the "Volume Variance".&amp;nbsp; You can see from the example below the difference in the data through it summing the individual lines versus the expression working on the totals.&amp;nbsp; I want to pull the total of the individual lines into the summary report so this reconciles to the individual report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" height="271" src="https://community.qlik.com/legacyfs/online/100584_Capture.PNG" width="708" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 07:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-AGGR-function-to-sum-rows-in-a-pivot-table/m-p/972828#M967209</guid>
      <dc:creator />
      <dc:date>2015-10-01T07:49:26Z</dc:date>
    </item>
  </channel>
</rss>

