<?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: Aggr Function in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852356#M999275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per your statement "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sale of highest sold product for previous year&lt;/SPAN&gt;" you can do something like attached here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2015 11:37:52 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2015-06-18T11:37:52Z</dc:date>
    <item>
      <title>Aggr Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852352#M999271</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;To return sale of highest sold product for previous year I found this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-family: Lato, Arial; font-size: 15px; text-align: justify;"&gt;=Max({&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} aggr (sum( {&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} Sale),Company_Name,Product))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-family: Lato, Arial; font-size: 15px; text-align: justify;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why does does Max have to have &lt;STRONG style="color: #333333; font-family: Lato, Arial; font-size: 15px; text-align: justify;"&gt;{&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} &lt;/STRONG&gt;after it, and not just&lt;STRONG style="color: #333333; font-family: Lato, Arial; font-size: 15px; text-align: justify;"&gt; Max(aggr(sum &lt;/STRONG&gt;and then the rest?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 10:56:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852352#M999271</guid>
      <dc:creator>stjernvd</dc:creator>
      <dc:date>2015-06-18T10:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852353#M999272</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;The above expression is used to get max sales last year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 11:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852353#M999272</guid>
      <dc:creator />
      <dc:date>2015-06-18T11:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852354#M999273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amardip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just wondering why the function isn't:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12pt;"&gt;Max(aggr (sum( {&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} Sale),Company_Name,Product))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;instead of&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #333333; font-size: 12pt;"&gt;&lt;STRONG style="color: #333333; font-size: 12pt;"&gt;=Max({&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} aggr (sum( {&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;} Sale),Company_Name,Product))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12pt;"&gt;Do they both mean the same thing? Why is Max(year) used twice?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 11:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852354#M999273</guid>
      <dc:creator>stjernvd</dc:creator>
      <dc:date>2015-06-18T11:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852355#M999274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried using both the expressions? Do they give you the same results, if they do then in your case it won't matter, but there are times (hard to give an example) where it does make sense to use a set expression in the outermost function also. Ultimately it all depends on the requirement.&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, 18 Jun 2015 11:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852355#M999274</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-18T11:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852356#M999275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per your statement "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sale of highest sold product for previous year&lt;/SPAN&gt;" you can do something like attached here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 11:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-in-Set-Analysis/m-p/852356#M999275</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-06-18T11:37:52Z</dc:date>
    </item>
  </channel>
</rss>

