<?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: sum if / sum aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894218#M311308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a straight table with &lt;STRONG&gt;ID&lt;/STRONG&gt; as &lt;STRONG&gt;dimension&lt;/STRONG&gt; and &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RangeSum(Expression1, -Expression2) &lt;/STRONG&gt;as&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Expression &lt;/STRONG&gt;and see if it gives you numeric value for ID's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2015 15:19:04 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-06-24T15:19:04Z</dc:date>
    <item>
      <title>sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894215#M311305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following expressions, both work fine separately. Now I need to subtract them, and have the equivalent to "sum of rows" that one can have in straight table. I think I should use aggregate, but it returns null when I use it. Could someone help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression 1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;(min({&amp;lt;myYear=,myMonth=,myDay=,myDate=,[Date 1]={'&amp;lt;$(=date(min(myDate)))'},[Date 2]={'&amp;gt;=$(=date(min(myDate)))&amp;lt;=$(=date(max(myDate)))'}&amp;gt;}[Date 2])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;(could also be achieved with max, sum or only)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression 2: &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;-(min(total{$} &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;([Data])))&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Final expression:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;sum(aggr(Expression 1 - Expression 2 , ID))&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;This final expression returns null. &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks in advance.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Inês&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894215#M311305</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T15:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894216#M311306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(RangeSum(Expression1, -Expression2), ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894216#M311306</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T15:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894217#M311307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/sunindia"&gt;sunindia&lt;/A&gt;&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. It works on the RangeSum level, but unfortunately, when I use the aggr function it returns null anyway. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand what I am doing wrong, since the expressions work fine separately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894217#M311307</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T15:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894218#M311308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a straight table with &lt;STRONG&gt;ID&lt;/STRONG&gt; as &lt;STRONG&gt;dimension&lt;/STRONG&gt; and &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RangeSum(Expression1, -Expression2) &lt;/STRONG&gt;as&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Expression &lt;/STRONG&gt;and see if it gives you numeric value for ID's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894218#M311308</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T15:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894219#M311309</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;I have it already and still nothing... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="aggr.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/90698_aggr.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894219#M311309</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T15:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894220#M311310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first column is the ID, the second one is the correct value for each ID, but the sum is incorrect. However, if I use "sum of rows" instead of "expression total", it works. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894220#M311310</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894221#M311311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your second expression, can you add &lt;STRONG&gt;Sum&lt;/STRONG&gt; next to &lt;STRONG&gt;Aggr&lt;/STRONG&gt; like this: &lt;STRONG&gt;Sum&lt;/STRONG&gt;(Aggr(.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it give you nulls still?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894221#M311311</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T15:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894222#M311312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since the aggr returns null, the sum (aggr (...)) returns zero &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894222#M311312</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T15:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894223#M311313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a sample I can look at?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 15:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894223#M311313</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T15:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894224#M311314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it follows. I am selecting the entire month of january, 2015, as it is in the image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;IMG alt="aggr2.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/90699_aggr2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 16:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894224#M311314</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T16:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894225#M311315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression seems to be working:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;myYear=,myMonth=,myDay=,myDate= &amp;gt;} Aggr(Min({&amp;lt;myYear=,myMonth=,myDay=,myDate=,[Date 1]={'&amp;lt;$(=date(min(myDate)))'},[Date 2]={'&amp;gt;=$(=date(min(myDate)))&amp;lt;=$(=date(max(myDate)))'}&amp;gt;}[Date 2])-Min(TOTAL [myDate]), [Nº de Episódio]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 16:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894225#M311315</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-24T16:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: sum if / sum aggr</title>
      <link>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894226#M311316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh my God. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been working on this for days... And now it works!! Thank you so much! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best, &lt;/P&gt;&lt;P&gt;Inês&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 16:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-if-sum-aggr/m-p/894226#M311316</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-06-24T16:36:58Z</dc:date>
    </item>
  </channel>
</rss>

