<?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: Set Analysis inside Aggr() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1654372#M731815</link>
    <description>&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 23:01:36 GMT</pubDate>
    <dc:creator>saifuddin</dc:creator>
    <dc:date>2019-12-04T23:01:36Z</dc:date>
    <item>
      <title>Set Analysis inside Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1651662#M731813</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help with a query. I am trying to show avg of the mark for current and previous Trimester.&amp;nbsp; I am using set analysis inside an aggr() function.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=SUM(AGGR(SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;} DISTINCT( POINTS/6*Score)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUM(AGGR(SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;}DISTINCT(POINTS/6)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For the current selection, it works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the issue is with the previous Trimester. it doesn't show any data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=SUM(AGGR(SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;} DISTINCT( POINTS/6*Score)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUM(AGGR(SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;}DISTINCT(POINTS/6)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;another requirement I have is to show avg of last five Trimester.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the excel file and the QVW for more info&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saif&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1651662#M731813</guid>
      <dc:creator>saifuddin</dc:creator>
      <dc:date>2024-11-16T01:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis inside Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1651666#M731814</link>
      <description>&lt;P&gt;When using AGGR &amp;amp; Set Analysis, you should apply set analysis inside &amp;amp; outside Aggr. Otherwise outside Sum will work for Current selections, Sum inside the Aggr works for the Set analysis filtered data so the result will be Intersection of Selection &amp;amp; set analysis.&lt;/P&gt;&lt;P&gt;PFB the expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;} AGGR(SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;} DISTINCT( POINTS/6*Score)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;} AGGR(SUM({&amp;lt;Trimester={'$(vTrimester01)'}&amp;gt;}DISTINCT(POINTS/6)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will suggest you to correct Current Trimester expression as well&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;}AGGR(SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;} DISTINCT( POINTS/6*Score)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;}AGGR(SUM({&amp;lt;Trimester={'$(vTrimester)'}&amp;gt;}DISTINCT(POINTS/6)), ID, Scode, START_DT))&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 05:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1651666#M731814</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2019-11-27T05:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis inside Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1654372#M731815</link>
      <description>&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 23:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-Aggr-function/m-p/1654372#M731815</guid>
      <dc:creator>saifuddin</dc:creator>
      <dc:date>2019-12-04T23:01:36Z</dc:date>
    </item>
  </channel>
</rss>

