<?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: Date range within IF statement (greater than/less than) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914228#M317140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Sinan's answer is correct (maybe switching &amp;lt;= with &amp;gt;=)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding you solution, I think it can work&lt;/P&gt;&lt;P&gt;if(Status='Open', &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ID#,&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;if(......&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;=[Closure Date_Month-Year] and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Closure Date_Month-Year]&amp;lt;=....., ID#&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but&lt;/P&gt;&lt;P&gt;Today() not Today(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Closure Date_Month-Year])&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;in the 2nd if you need to condition for your Closure Date&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2015 17:12:30 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-08-06T17:12:30Z</dc:date>
    <item>
      <title>Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914224#M317136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having an issue defining a date range within an expression IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I want the field &lt;STRONG&gt;ID#&lt;/STRONG&gt; to display as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the &lt;STRONG&gt;Status&lt;/STRONG&gt; field is 'Open' or if the &lt;STRONG&gt;Closure Date&lt;/STRONG&gt; is in the last 12 months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My IF statement looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If([Status]='Open', ID#,&lt;/P&gt;&lt;P&gt;If(MonthStart(AddMonths(Today([Closure Date_Month-Year]),-12))&amp;lt;=[Closure Date_Month-Year]&amp;lt;=MonthEnd(AddMonths(Today([Closure Date_Month-Year]),-1)), ID#))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax seems to be saccepted, but it is not producing any results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 16:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914224#M317136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-06T16:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914225#M317137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think what you want to do is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=If(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status]='Open'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Or &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthStart(AddMonths(Today(),-12))&amp;gt;=[Closure Date_Month-Year] and &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Closure Date_Month-Year]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;=MonthEnd(AddMonths(Today(),-1)))&lt;/SPAN&gt;, ID#,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 16:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914225#M317137</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-06T16:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914226#M317138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If([Status]='Open' or&lt;/P&gt;&lt;P&gt;(MonthStart(AddMonths(Today([Closure Date_Month-Year]),-12))&amp;lt;=[Closure Date_Month-Year] and &lt;/P&gt;&lt;P&gt;&amp;nbsp; [Closure Date_Month-Year]&amp;lt;=MonthEnd(AddMonths(Today([Closure Date_Month-Year]),-1))),ID#)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 16:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914226#M317138</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-08-06T16:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914227#M317139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are not able to use today() with anything else than 0,1,2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If([Status]='Open', ID#,&lt;/P&gt;&lt;P&gt;If(addMonths(Today(),-12))&amp;gt;=[Closure Date_Month-Year], ID#))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 17:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914227#M317139</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-08-06T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914228#M317140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Sinan's answer is correct (maybe switching &amp;lt;= with &amp;gt;=)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding you solution, I think it can work&lt;/P&gt;&lt;P&gt;if(Status='Open', &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ID#,&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;if(......&amp;lt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;=[Closure Date_Month-Year] and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Closure Date_Month-Year]&amp;lt;=....., ID#&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but&lt;/P&gt;&lt;P&gt;Today() not Today(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Closure Date_Month-Year])&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;in the 2nd if you need to condition for your Closure Date&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 17:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914228#M317140</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-06T17:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date range within IF statement (greater than/less than)</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914229#M317141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both solutions from Sinan and Ramon worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct Massimo, aside from the &amp;lt;= which had to swapped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The root of the error was having the field name within the operator today(), as you pointed out Ramon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 10:23:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-within-IF-statement-greater-than-less-than/m-p/914229#M317141</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-07T10:23:12Z</dc:date>
    </item>
  </channel>
</rss>

