<?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 Multiple aggregation in an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318415#M498672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So If I have 2 dimention for example year and month in pivot table so how would the formula gonna look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year Month Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should the sales expression look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Sum(Aggr(ColumnA+ColumnB, Year,Month))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2011 14:42:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-06-24T14:42:50Z</dc:date>
    <item>
      <title>Multiple aggregation in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318411#M498668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a basic stupid question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to subtract one column from another in a pivot table and I'm confused how should I write the expression. I know only 2 ways we can write it which are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-&amp;nbsp; Sum(ColumnA - ColumnB)&lt;/P&gt;&lt;P&gt;2- Sum(ColumnA)-Sum(ColumnB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got 4 columns in total. Year, Month, ColumnA and ColumnB and the problem is that I'm getting slightly different total when I use above expressions. I thought both expressions mentioned above should give me exact same result but its not. Can anyone please help me explaining the basic difference b/w abover expressions?&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 09:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318411#M498668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-24T09:32:18Z</dc:date>
    </item>
    <item>
      <title>Multiple aggregation in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318412#M498669</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;If you had the following columns:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; B&lt;/P&gt;&lt;P&gt;1&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;2&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;3&amp;nbsp; -&lt;/P&gt;&lt;P&gt;-&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(A+B) would be 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(A)+Sum(B) Would be 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because QlikView will ignore the nulls in the individual totals but anything plus null() is null().&amp;nbsp; So, do you have null values in your data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 14:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318412#M498669</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-06-24T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Multiple aggregation in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318413#M498670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I forgot to mention that I'm using a pivot table and not getting the same result with with the expressions I mentioned above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I might need to use aggr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how can I add 2 columns using aggr in a pivot table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 14:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318413#M498670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-24T14:15:59Z</dc:date>
    </item>
    <item>
      <title>Multiple aggregation in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318414#M498671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(ColumnA+ColumnB, Dimension))&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;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 14:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318414#M498671</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-06-24T14:18:29Z</dc:date>
    </item>
    <item>
      <title>Multiple aggregation in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318415#M498672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So If I have 2 dimention for example year and month in pivot table so how would the formula gonna look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year Month Sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should the sales expression look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Sum(Aggr(ColumnA+ColumnB, Year,Month))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 14:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggregation-in-an-expression/m-p/318415#M498672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-24T14:42:50Z</dc:date>
    </item>
  </channel>
</rss>

