<?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: Return a value for a Date Range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824774#M290524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Payment_Type&lt;/P&gt;&lt;P&gt;Promotion_Start_Date, &lt;BR /&gt;Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD,&lt;BR /&gt; if([Promotion_Start_Date] &amp;lt;= today()+21 and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM&lt;/P&gt;&lt;P&gt;\\file on server&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2014 16:47:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-12-12T16:47:52Z</dc:date>
    <item>
      <title>Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824772#M290522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an instance where I have promotions that I want to identify in a seperate column anything that has a Promotion Start Date of TODAY out to 21 days, here is the script I have right now, I tried multiple OR statements for each today()+1 or today()+2, all the way out to +21 and it doesn't seem to work I also need to include another condition with an AND statement for the Column of PAYMENT TYPE must be equal to 'Off Invoice". Can anyone advise, the following is the script piece where I am using the promotion date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Promotion_Start_Date, &lt;BR /&gt; Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD,&lt;BR /&gt; if([Promotion_Start_Date] &amp;lt;= today()+21 and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 16:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824772#M290522</guid>
      <dc:creator />
      <dc:date>2014-12-12T16:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824773#M290523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the the full load command ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 16:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824773#M290523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-12T16:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824774#M290524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Payment_Type&lt;/P&gt;&lt;P&gt;Promotion_Start_Date, &lt;BR /&gt;Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD,&lt;BR /&gt; if([Promotion_Start_Date] &amp;lt;= today()+21 and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM&lt;/P&gt;&lt;P&gt;\\file on server&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 16:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824774#M290524</guid>
      <dc:creator />
      <dc:date>2014-12-12T16:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824775#M290525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Promotion_Start_Date on if must on Date Format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date# (Promotion_Start_Date, 'MM/DD/YYYY') &amp;lt;=.....)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 16:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824775#M290525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-12T16:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824776#M290526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe you have to &lt;STRONG&gt;Date#&lt;/STRONG&gt; also in the if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Promotion_Start_Date, &lt;BR /&gt;Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD,&lt;BR /&gt;if(&amp;nbsp; (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px;"&gt;&lt;STRONG&gt;Date# (Promotion_Start_Date, 'MM/DD/YYYY')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &amp;lt;= (today()+21))&lt;/STRONG&gt; and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 16:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824776#M290526</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-12-12T16:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824777#M290527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14184039472748300" jivemacro_uid="_14184039472748300"&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(DAY_COD &amp;lt;= Today()+21 and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks;&lt;/P&gt;
&lt;P&gt;LOAD Promotion_Start_Date, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD&lt;/P&gt;
&lt;P&gt;FROM yoursource;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 17:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824777#M290527</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-12-12T17:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824778#M290528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK adding the Date # got me to the point that I can produce an = in the today(). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how do I script it to tag everything from today out to 21 days. Is there a way to say between today() and today()+21 ?&amp;nbsp; Thank you for your help a head of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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: #0000ff; font-size: 8pt;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Promotion_Start_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY') = (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()+21)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Payment_Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Off Invoice','PENDING') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OI_Active_Within_3_Weeks&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 17:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824778#M290528</guid>
      <dc:creator />
      <dc:date>2014-12-12T17:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824779#M290529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14184057695697973 jive_macro_code" jivemacro_uid="_14184057695697973"&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(DAY_COD &amp;gt;= Today() and DAY_COD &amp;lt;= Today()+21 and [Payment_Type] = 'Off Invoice','PENDING') as OI_Active_Within_3_Weeks;&lt;/P&gt;
&lt;P&gt;LOAD Promotion_Start_Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date# (Promotion_Start_Date, 'MM/DD/YYYY') as DAY_COD&lt;/P&gt;
&lt;P&gt;FROM yoursource;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 17:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824779#M290529</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-12-12T17:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value for a Date Range</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824780#M290530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK with everyone's help I figured it out, it was a combination of the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&amp;nbsp; (Date# (**Date Field**, 'MM/DD/YYYY') &amp;gt;= (today())) and&amp;nbsp; (Date# (**Date Field**, 'MM/DD/YYYY') &amp;lt;= (today()+21))&amp;nbsp; and [**Second Condition**] = '**VALUE**','**RETURN VALUE**') as **New Field Name**&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 21:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-for-a-Date-Range/m-p/824780#M290530</guid>
      <dc:creator />
      <dc:date>2014-12-12T21:09:48Z</dc:date>
    </item>
  </channel>
</rss>

