<?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: SUMIF versus IF in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173085#M381129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are very different. In first you are saying that if the dimension Risk = Par then show me the Sum(Cashflow). So this in a chart with Risk as dimension would show you Sum(Cashflow) only where Risk = Par. Whereas the other one is saying that regardless of your dimension sum only those rows where Risk = Par.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 May 2016 16:29:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-30T16:29:40Z</dc:date>
    <item>
      <title>SUMIF versus IF</title>
      <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173083#M381127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a simple expression in QlikView. While I do get the right answer, I do not understand why only one of two approaches is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically, when I try to write the following expression, nothing executes and the chart collapses unless I have the filter selected (i.e., if filter for 'Par' in the Risk list box, then the expressions executes correctly):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Risk]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ='Par',&lt;BR /&gt; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum(&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cashflow&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I use the following Sumif equation, the expressions executes correctly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Risk]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Par',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cashflow&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,0)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Does anyone happen to know why this is the case; in my opinion, both expressions should provide the same output. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173083#M381127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-30T15:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: SUMIF versus IF</title>
      <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173084#M381128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use set analysis instead Sum if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;alt(sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Risk]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Par'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cashflow)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 16:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173084#M381128</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-30T16:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: SUMIF versus IF</title>
      <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173085#M381129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are very different. In first you are saying that if the dimension Risk = Par then show me the Sum(Cashflow). So this in a chart with Risk as dimension would show you Sum(Cashflow) only where Risk = Par. Whereas the other one is saying that regardless of your dimension sum only those rows where Risk = Par.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 16:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173085#M381129</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T16:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: SUMIF versus IF</title>
      <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173086#M381130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two expression although seems doing the same thing, they have a particular difference.&lt;/P&gt;&lt;P&gt;That difference is that in the first case you need to apply a filter like choosing one option on your listbox of the field [Risk] and in the other you don't need any selection. Another way of doing this should be using set analysis in your sum like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;Risk = 'Par'&amp;gt;} Cashflow) -&amp;gt; if doesn't matter your selections&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Risk = 'Par'&amp;gt;} Cashflow) -&amp;gt; if matters your selections &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this can hel you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some nice tip: don't use sums with if's, try to implement your if's toicreate flags then use those flags inside the if's like this example: [ =sum(flag * Cashflow) ] -&amp;gt; This case flag in the script should be assigned like this: if(Risk = 'Par', 1, 0) as flag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 16:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173086#M381130</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2016-05-30T16:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: SUMIF versus IF</title>
      <link>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173087#M381131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3807"&gt;Conditional Aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 16:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUMIF-versus-IF/m-p/1173087#M381131</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-30T16:37:49Z</dc:date>
    </item>
  </channel>
</rss>

