<?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 Problem Comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745417#M1030550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you are trying to compare an Array to another Array and display only one value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the expected output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum(Aggr(sum(Clau),Grup)) &amp;gt;= sum(Aggr(sum(Est),Grup)), 'Bigger', 'Smaller')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2015 12:32:51 GMT</pubDate>
    <dc:creator>simenkg</dc:creator>
    <dc:date>2015-02-18T12:32:51Z</dc:date>
    <item>
      <title>AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745412#M1030541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;As I know, Qlikview permits to operate with 2 aggr expresions, for example:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78434_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;So, QV will sum the 1st expresion + the 2nd expresion for each "Grup" dimension. That's perfect!&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 14pt;"&gt;But, &lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;he problem appears when we want to compare both aggr, for example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/78435_pastedImage_4.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Here, QV only compares the first group of the dimension called "Grup" and applies the result for all the other "Grup" values. So, QV does not do the comparison for&amp;nbsp; every single "Grup" value.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Do you know any other way to compare 2 aggr?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thank you in advance!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745412#M1030541</guid>
      <dc:creator />
      <dc:date>2015-02-18T12:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745413#M1030543</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;Try adding sum() before Aggr()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;sum(Aggr(Sum()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then your expression became&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(&lt;/P&gt;&lt;P&gt;sum(Aggr(Sum({Referencia*comun&amp;lt;Morts={1}&amp;gt;}Clau),Grup)) &amp;gt;= sum(Aggr(Sum({Referencia*comun}Est),Grup))&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;'Bigger'&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;'Smaller'&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745413#M1030543</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-02-18T12:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745414#M1030544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you doing this comparison?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Grup is the dimensjon in your chart then a simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum(Clau)&amp;gt;=Sum(Est),'Bigger','Smaller') should work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have other dimensions in your chart you will have to use the NODISTINCT modifier to get the result of the aggr over more than one record per Grup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(Nodistinct if(Sum(Clau)&amp;gt;=Sum(Est), 'Bigger', 'Smaller'), Grup)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745414#M1030544</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2015-02-18T12:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745415#M1030546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank for response.&lt;/P&gt;&lt;P&gt;If a put "sum" before the "aggr" QV will aggregate each expresion by the dimension "Grup" and I QV will compare only 2 numbers, 1 for each expresion. And what I want is that QV compares all the possible values of the dimension "Grup" for both expresions, without aggregating the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745415#M1030546</guid>
      <dc:creator />
      <dc:date>2015-02-18T12:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745416#M1030548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exacly, the problem is that I need this comparison in a text object, but not in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745416#M1030548</guid>
      <dc:creator />
      <dc:date>2015-02-18T12:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745417#M1030550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you are trying to compare an Array to another Array and display only one value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the expected output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum(Aggr(sum(Clau),Grup)) &amp;gt;= sum(Aggr(sum(Est),Grup)), 'Bigger', 'Smaller')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:32:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745417#M1030550</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2015-02-18T12:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745418#M1030552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The real formula is:&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78446_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The expected output is a single value. I need the "If comparison" because there 2 ways of calculations, depending of the result of the initial condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 13:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745418#M1030552</guid>
      <dc:creator />
      <dc:date>2015-02-18T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745419#M1030554</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;you can only add two Aggr() expressions if they both return a single value, so you adding two scalar values, not two lists. If they return a list of value, rather than just a single value, the addition returns NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So adding two scalar values does not require an Aggr() expression. If the table has Grup as a dimension, the table dimension will take care if the grouping, and you can just compare the two sums inside the Aggr() expressions with each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745419#M1030554</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-02-18T14:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745420#M1030555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(sum({Referencia*Comun&amp;lt;Morts={1}&amp;gt;}Clau&amp;gt;=Sum({Referencia*Comun}Est)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (sum({Activitat*Comun&amp;lt;Morts={1}&amp;gt;}Clau) * Sum({Referencia*Comun&amp;lt;Morts={1}&amp;gt;}Clau) /&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({Referencia*Comun}Clau))&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({Activitat*Comun&amp;lt;Morts){1}&amp;gt;}Clau)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Grup)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745420#M1030555</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2015-02-18T14:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR Problem Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745421#M1030556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Woooow yes!!!...I have checked and that's exactly what I need. Thank you Simen &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 14:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AGGR-Problem-Comparison/m-p/745421#M1030556</guid>
      <dc:creator />
      <dc:date>2015-02-18T14:37:53Z</dc:date>
    </item>
  </channel>
</rss>

