<?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: issue with if statement inside sum function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546002#M203944</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's something wrong with your data structure. You must post an example so we can stop guessing. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jul 2013 21:23:14 GMT</pubDate>
    <dc:creator>luciancotea</dc:creator>
    <dc:date>2013-07-05T21:23:14Z</dc:date>
    <item>
      <title>issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545997#M203939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an if statement inside my sum function that is giving wrong result. For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( if(year(IncidentDate)&amp;gt;= year(MaxIncindentDate) - 2,calltime)) is giving me 515224 while sum(calltime) is giving me 357.7951 value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that the condition inside if statement is supposed to fetch all data as I only have past two years data at the moment and the if statement means to fetch data for last three years including current year. Therefore, logically both statements should give same result. I believe that 357.7951 is the correct value though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me understand the difference here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 20:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545997#M203939</guid>
      <dc:creator />
      <dc:date>2013-07-05T20:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545998#M203940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose that &lt;EM&gt;IncidentDate&lt;/EM&gt;, &lt;EM&gt;MaxIncidentDate &lt;/EM&gt;and &lt;EM&gt;calltime &lt;/EM&gt;are not in the same table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 20:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545998#M203940</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-05T20:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545999#M203941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IncidentDate and Calltime are in same table. MaxIncidentDate is a variable i created in load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I had to write the same statement in a set analysis, how will the statement look like?&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 20:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/545999#M203941</guid>
      <dc:creator />
      <dc:date>2013-07-05T20:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546000#M203942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;IncidentDate&lt;/SPAN&gt;={"&amp;gt;=$(=YearStart(AddYears(MaxIncidentDate, -2)))"}&amp;gt;} &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;calltime&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 21:05:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546000#M203942</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-05T21:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546001#M203943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK the set analsysi expression is also giving 515224. Then I tried sum( if(1,calltime)) and it is also giving 515224 value. sum(calltime) is giving 357.7951 value though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure whats happening here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 21:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546001#M203943</guid>
      <dc:creator />
      <dc:date>2013-07-05T21:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: issue with if statement inside sum function</title>
      <link>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546002#M203944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's something wrong with your data structure. You must post an example so we can stop guessing. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 21:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-with-if-statement-inside-sum-function/m-p/546002#M203944</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-05T21:23:14Z</dc:date>
    </item>
  </channel>
</rss>

