<?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 If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/186849#M50771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;when I read the first part of your question "... if(isnull(Year) = -1 then set the year = 2010 ...", that is translated as:&lt;BR /&gt;if(isnull(Year),2010)&lt;BR /&gt;But you probably want to keep the non null values, which gives:&lt;BR /&gt;if(isnull(Year),2010,Year)&lt;BR /&gt;From your explanation, I do not understand why the "sum" appears in your formula.&lt;BR /&gt;Greetings,&lt;BR /&gt;Piet&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Mar 2010 18:10:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-03-19T18:10:01Z</dc:date>
    <item>
      <title>If statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/186848#M50770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to find a better way of doing this if statement. How would you go about saying, if(isnull(Year) = -1 then set the year = 2010.&lt;/P&gt;&lt;P&gt;I'm currently doing this and am hoping to find a method that is a bit more efficient.&lt;/P&gt;&lt;P&gt;if(isnull([Fiscal Year]) = -1, sum({$&amp;lt;[Fiscal Year]={2010}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 13:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/186848#M50770</guid>
      <dc:creator />
      <dc:date>2010-03-19T13:25:57Z</dc:date>
    </item>
    <item>
      <title>If statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement/m-p/186849#M50771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;when I read the first part of your question "... if(isnull(Year) = -1 then set the year = 2010 ...", that is translated as:&lt;BR /&gt;if(isnull(Year),2010)&lt;BR /&gt;But you probably want to keep the non null values, which gives:&lt;BR /&gt;if(isnull(Year),2010,Year)&lt;BR /&gt;From your explanation, I do not understand why the "sum" appears in your formula.&lt;BR /&gt;Greetings,&lt;BR /&gt;Piet&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 18:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement/m-p/186849#M50771</guid>
      <dc:creator />
      <dc:date>2010-03-19T18:10:01Z</dc:date>
    </item>
  </channel>
</rss>

