<?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 with Sum and AGGR function not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597518#M595631</link>
    <description>&lt;P&gt;Use this please:&lt;/P&gt;&lt;P&gt;num(aggr(sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;}[Credit Hour]),&lt;BR /&gt;Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career]),'#,##0')&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2019 06:12:46 GMT</pubDate>
    <dc:creator>anushree1</dc:creator>
    <dc:date>2019-07-01T06:12:46Z</dc:date>
    <item>
      <title>Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597436#M595625</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;I have the below expression which is not working because I think the set analysis expression in the outer sum "[Semester Year Name]=," is not being considered in the internal aggr when there is a selection on&amp;nbsp;[Semester Year Name].&lt;/P&gt;&lt;P&gt;=num(sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;}aggr([Credit Hour], Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career])),'#,##0')&lt;/P&gt;&lt;P&gt;How do I add a set analysis for the internal aggr function? I tried moving the sum expression to the aggr function but it didn't work. I tried having the sum and the set analysis inside the aggr function but that also didn't work. any ideas?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 08:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597436#M595625</guid>
      <dc:creator>Edge</dc:creator>
      <dc:date>2019-06-30T08:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597467#M595626</link>
      <description>&lt;P&gt;Putting the set analysis inside the aggr function should work.&lt;/P&gt;&lt;P&gt;I see that you're&amp;nbsp; not using an aggregation function inside the aggr function: aggr([Credit Hour], ....&lt;BR /&gt;That means that implicitly the Only() function is used as the aggregation function. If is more than one [Credit Hour] value exists per combination of the dimensions you use in the aggr function then Only() function will return null. Perhaps you want to specifify an aggregation function explicitly. Maybe the sum function: aggr(SUM([Credit Hour]), ....&lt;BR /&gt;Or the Avg, Min or Max function. Whatever is appropriate in your case.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 15:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597467#M595626</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-06-30T15:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597504#M595627</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Gysbert,&lt;/P&gt;&lt;P&gt;Many thanks for your response. I tried having the set analysis inside the aggr function but qv gives me an error.&lt;/P&gt;&lt;P&gt;Kindly see attached screenshot. I am not sure what do you mean when you talk about the only() function. I am not even sure what is the only() function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;All I know about the aggr function that it will return one number of credit hours removing duplicates for the dimensions I am aggregating. Is this correct?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 05:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597504#M595627</guid>
      <dc:creator>Edge</dc:creator>
      <dc:date>2019-07-01T05:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597505#M595628</link>
      <description>&lt;P&gt;Hi Again,&lt;/P&gt;&lt;P&gt;I tried adding the set analysis inside the aggr function and updated the object even though QV was giving me an error.&lt;/P&gt;&lt;P&gt;It seems that QV totally ignores the set analysis inside the aggr function.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 05:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597505#M595628</guid>
      <dc:creator>Edge</dc:creator>
      <dc:date>2019-07-01T05:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597515#M595629</link>
      <description>&lt;P&gt;Please try:&lt;/P&gt;&lt;P&gt;num(aggr(sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;}[Credit Hour])&lt;BR /&gt;Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career]),'#,##0')&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 06:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597515#M595629</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-07-01T06:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597517#M595630</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I think Gysbert meant you to do something like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;num(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;} &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;aggr(&lt;FONT color="#FF0000"&gt;&lt;FONT size="4" color="#339966"&gt;&lt;STRONG&gt;Only&lt;/STRONG&gt;&lt;/FONT&gt;(&amp;nbsp;{$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;} [Credit Hour])&lt;/FONT&gt;,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career]))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,'#,##0')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;num(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;} &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;aggr(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT size="4" color="#339966"&gt;Max&lt;/FONT&gt;&lt;/STRONG&gt;(&amp;nbsp;{$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;} [Credit Hour])&lt;/FONT&gt;,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career]))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,'#,##0')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You should use an &lt;STRONG&gt;&lt;FONT size="4" color="#339966"&gt;aggregation function&lt;/FONT&gt;&lt;/STRONG&gt; inside the AGGR too (Only by default, max, count, sum...) with its own set analysis expression.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 06:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597517#M595630</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-07-01T06:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597518#M595631</link>
      <description>&lt;P&gt;Use this please:&lt;/P&gt;&lt;P&gt;num(aggr(sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;}[Credit Hour]),&lt;BR /&gt;Enrolment.EMPLID, [Course Number], SemesterNO, Location, [Course College], [Academic Career]),'#,##0')&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 06:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597518#M595631</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2019-07-01T06:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597520#M595632</link>
      <description>&lt;P&gt;On the other hand:&lt;/P&gt;&lt;P&gt;You use an AGGR with [Credit Hour] and the you &lt;EM&gt;Sum&lt;/EM&gt; it. Given the linear property of the sum, isnt your expression equivalent to:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;num(sum({$&amp;lt;[Enrolled Date]={'$(=Date(today()-365))'},[Semester Year Name]=,SemesterNO={$(=vCombined_Adm_Progn_Max_SemesterNO_Last_year)}&amp;gt;} [Credit Hour]),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With&lt;STRONG&gt; no AGGR function&lt;/STRONG&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jaime&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 06:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597520#M595632</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-07-01T06:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597550#M595633</link>
      <description>&lt;P&gt;Hi Jaime,&lt;/P&gt;&lt;P&gt;First many thanks to all who responded. I am testing all options now.&lt;/P&gt;&lt;P&gt;The reason the previous developer used aggr is:&lt;/P&gt;&lt;P&gt;I think from what I understood from previous comments in this thread because aggr applies the only function by default.&lt;/P&gt;&lt;P&gt;So she gets one CHS value for that combination of dimension and hence duplicate records have no impact on the sum.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So your option won't work for sure.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 07:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597550#M595633</guid>
      <dc:creator>Edge</dc:creator>
      <dc:date>2019-07-01T07:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Sum and AGGR function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597647#M595634</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;Many thanks to all who volunteered and helped with answering this question. I have marked the answers which worked for me. Many thanks for both.&lt;/P&gt;&lt;P&gt;But I have realized something weird though. That if I don't have the set analysis in the outer sum() and the max() or only() function inside aggr(), then the expression won't work.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 11:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Sum-and-AGGR-function-not-working/m-p/1597647#M595634</guid>
      <dc:creator>Edge</dc:creator>
      <dc:date>2019-07-01T11:16:16Z</dc:date>
    </item>
  </channel>
</rss>

