<?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: How AGGR is different from TOTAL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567975#M1119991</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;Thanks to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have small misunderstanding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In load script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cust_DT:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; Sum(Sal_AMT)&amp;nbsp; from &amp;lt;Table_Name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group by &lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;STRONG&gt;customer;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; background: white; font-size: 9.0pt; font-family: 'Helvetica','sans-serif';"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Now here, what is difference between into &lt;STRONG&gt;AGGR&lt;/STRONG&gt; and &lt;STRONG&gt;Group by&lt;/STRONG&gt; &amp;lt;Column Name&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Raja.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 09:53:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-11T09:53:45Z</dc:date>
    <item>
      <title>How AGGR is different from TOTAL</title>
      <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567971#M1119987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How AGGR is different from TOTAL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567971#M1119987</guid>
      <dc:creator />
      <dc:date>2014-02-11T09:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How AGGR is different from TOTAL</title>
      <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567972#M1119988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AGGR is used in nested functions (like RANK)&lt;/P&gt;&lt;P&gt;It creates a "temp" table dimensionned by the dimensions put in arguments. Then, you use this "temp" table to do sth nested: average, rank ...&lt;/P&gt;&lt;P&gt;sum(TOTAL &amp;lt;xxx&amp;gt; Field) is directly used by the chart and cannot be nested&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567972#M1119988</guid>
      <dc:creator />
      <dc:date>2014-02-11T09:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: How AGGR is different from TOTAL</title>
      <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567973#M1119989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;TOTAL means the expression (Sum, Min) etc. is applied across all the records available to the chart, rather than just those matching the dimensions on this row.&amp;nbsp; If you include a field in the &amp;lt;...&amp;gt;, then it will create a subtotal for each unique combination of those fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;AGGR on the other hand creates a mini-chart based on the expr and dimension.&amp;nbsp; The mini-chart will have one expression (the one defined within the Aggr function) and one or more dimensions based on the fields listed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;Example data may be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;CustProd&amp;nbsp;&amp;nbsp;&amp;nbsp; TransDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/1/11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2/1/11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 110&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/1/11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 110&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;Working from the inside,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;Min(TOTAL &amp;lt;CustProd&amp;gt; TransDate).&amp;nbsp; Fairly easy.&amp;nbsp; This generates a list of CustProd records and the lowest TransDate for each.&amp;nbsp; If this was an expression it would return the first transdate for each Customer / Product.&amp;nbsp; Useful, but we want the price, not the date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;Next step, is to get the Price for the first date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;If(TransDate = Min(TOTAL &amp;lt;CustProd&amp;gt; TransDate),Price)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;This will return the Price is the TransDate is the first date for this CustProd record.&amp;nbsp; Problem is that in the chart, we list all dates, so this only shows the Price on the first record.&amp;nbsp; We want to see the first price on all records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;To do this, need to apply the first Sum(TOTAL &amp;lt;CustProd&amp;gt; so that it all records for a CustProd can access the first price.&amp;nbsp; But can't do this without putting in an AGGR function b/w the Sum and the Min.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;The AGGR(If(TransDate = Min(TOTAL &amp;lt;CustProd&amp;gt; TransDate),Price),CustProd,TransDate) creates a mini-chart that looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;CustProd&amp;nbsp;&amp;nbsp;&amp;nbsp; TransDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/1/11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;Only the first date is returned as all other dates fail the If(TransDate = Min...) test and so return Null (which is ignored).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;What's important is that every record for this CustProd will create the same chart - if it has access to all records of that CustProd - which it does as the first Sum function has TOTAL &amp;lt;CustProd&amp;gt; in it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;The final Sum(TOTAL &amp;lt;CustProd&amp;gt; .... ) simply sums the Price from that MiniChart and works out the first price is always 100.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567973#M1119989</guid>
      <dc:creator>agilos_mla</dc:creator>
      <dc:date>2014-02-11T09:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: How AGGR is different from TOTAL</title>
      <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567974#M1119990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;suppose you have a table in which fields are&lt;/P&gt;&lt;P&gt;Customer&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;value&lt;/P&gt;&lt;P&gt;now&lt;/P&gt;&lt;P&gt;Sum(Total value ) &lt;/P&gt;&lt;P&gt;then its output is the total of value for all customer&lt;/P&gt;&lt;P&gt;**********************************&lt;/P&gt;&lt;P&gt;sum(aggr(value,customer))&lt;/P&gt;&lt;P&gt;then output is customer&amp;nbsp; wise value .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567974#M1119990</guid>
      <dc:creator />
      <dc:date>2014-02-11T09:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: How AGGR is different from TOTAL</title>
      <link>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567975#M1119991</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;Thanks to all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have small misunderstanding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In load script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cust_DT:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; Sum(Sal_AMT)&amp;nbsp; from &amp;lt;Table_Name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group by &lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;STRONG&gt;customer;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; background: white; font-size: 9.0pt; font-family: 'Helvetica','sans-serif';"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Now here, what is difference between into &lt;STRONG&gt;AGGR&lt;/STRONG&gt; and &lt;STRONG&gt;Group by&lt;/STRONG&gt; &amp;lt;Column Name&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Raja.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 09:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-AGGR-is-different-from-TOTAL/m-p/567975#M1119991</guid>
      <dc:creator />
      <dc:date>2014-02-11T09:53:45Z</dc:date>
    </item>
  </channel>
</rss>

