<?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 Alternative in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099433#M891760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps This&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AccountingPeriod = {'&amp;gt;=EndDate &amp;lt;=StartDate}&lt;/SPAN&gt;&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SubscriptionCancellationDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate more what you want to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Aug 2016 02:17:38 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2016-08-27T02:17:38Z</dc:date>
    <item>
      <title>SUM If Alternative</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099432#M891759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I formulate a count if in Qlikview for this formula?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(AccountingPeriod.EndDate &amp;gt;= SubscriptionCancellationDate AND AccountingPeriod.StartDate &amp;lt;= SubscriptionCancellationDate, 1, 0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099432#M891759</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SUM If Alternative</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099433#M891760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps This&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AccountingPeriod = {'&amp;gt;=EndDate &amp;lt;=StartDate}&lt;/SPAN&gt;&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SubscriptionCancellationDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate more what you want to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 02:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099433#M891760</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-27T02:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: SUM If Alternative</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099434#M891761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set expression in Anil's example will limit the data set for the aggregation, which I think might give you an unexpected or incorrect result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that you try a Count() expression where the If() statement is inside the aggregation function. This means that when your condition is fulfilled 1 is added to the aggregation. When the condition is not fulfilled Null is added to the result, since the Else expression is undefined. Count(Null()) is equal to zero, to this means that the expression will return the number or 1's returned by the If() statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count(If(AccountingPeriod.EndDate &amp;gt;= SubscriptionCancellationDate AND AccountingPeriod.StartDate &amp;lt;= SubscriptionCancellationDate, 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;As a side note the same result can be retrieved by using Sum(), since it will simply add all the 1's.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(If(AccountingPeriod.EndDate &amp;gt;= SubscriptionCancellationDate AND AccountingPeriod.StartDate &amp;lt;= SubscriptionCancellationDate, 1))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 04:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-If-Alternative/m-p/1099434#M891761</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-08-27T04:28:27Z</dc:date>
    </item>
  </channel>
</rss>

