<?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: Aggregate &amp;amp; Average If Condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753967#M718718</link>
    <description>&lt;P&gt;Dear Mr Mayilvahanan&lt;/P&gt;&lt;P&gt;Many thanks for introducing the concept of intervalmatch again.&amp;nbsp; In fact, I had tried it before but failed so I dropped it. Now I know where is the error after studying your model answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards, Tracy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2020 07:38:38 GMT</pubDate>
    <dc:creator>tracycrown</dc:creator>
    <dc:date>2020-10-20T07:38:38Z</dc:date>
    <item>
      <title>Aggregate &amp; Average If Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753919#M718714</link>
      <description>&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;Kindly advise&amp;nbsp; how to integrate average and aggregate in If-then condition:&lt;/P&gt;&lt;P&gt;Table A - Grade is OK&lt;/P&gt;&lt;P&gt;Table B - Grade is wrong if using average score ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table C - (a) Not sure why I cannot use sum(Lower) and sum(Upper) in expression ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(b) Wrong Lower and Upper in Grade 5,6 and 7 ?&lt;/P&gt;&lt;P&gt;Thank you, Tracy&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753919#M718714</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate &amp; Average If Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753946#M718715</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28151"&gt;@tracycrown&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;PFA.&lt;/P&gt;&lt;P&gt;You need to use intervalMatch concept to achieve your result.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 06:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753946#M718715</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-10-20T06:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate &amp; Average If Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753954#M718716</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Table C.&lt;/STRONG&gt;&lt;BR /&gt;You did not use SUM(Lower) nor SUM(Upper) you used (Lower) and (Upper) that is equivalent to Only(Lower) and Only(Upper). In addition you have loaded more than one set of grades into your data model.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_0-1603177158673.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42619iAA074865A29B96A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vegar_0-1603177158673.png" alt="Vegar_0-1603177158673.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You are comparing to the sum(Grade) which will increase to above the limits of the grade. In addition you are referring to the Grade aggregated on both [Score] and [Term] which will give you trouble. Try adjusting the grade expression to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Aggr(If(avg(Score)&amp;gt;= (Lower) and avg(Score) &amp;lt;= (Upper),Only(Grade)),Student, Subject,Lower, Upper)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Your sample did not run because you had reference to two excelfiles. I'm attaching my edited qvw only loaded with the excel you attached to the posting.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:05:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753954#M718716</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-10-20T07:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate &amp; Average If Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753963#M718717</link>
      <description>&lt;P&gt;Dear Mr. Vegar&lt;/P&gt;&lt;P&gt;Many thanks for pointing out two different sets of data were used as I must be too tired after trying to solve the problem for many hours. Am I correct to say sum(Score) can be replaced by Score in future?.&lt;/P&gt;&lt;P&gt;Best Regards, Tracy&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753963#M718717</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2020-10-20T07:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate &amp; Average If Condition</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753967#M718718</link>
      <description>&lt;P&gt;Dear Mr Mayilvahanan&lt;/P&gt;&lt;P&gt;Many thanks for introducing the concept of intervalmatch again.&amp;nbsp; In fact, I had tried it before but failed so I dropped it. Now I know where is the error after studying your model answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards, Tracy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-amp-Average-If-Condition/m-p/1753967#M718718</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2020-10-20T07:38:38Z</dc:date>
    </item>
  </channel>
</rss>

