<?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 in the Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746069#M721364</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp; I am not sure you already tried it or not but it is what I am getting&amp;nbsp; as you can see in below screenshots which is what you need if I understood correctly&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-22 153752.png" style="width: 724px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41006iC3AE9E3CB35F761E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-22 153752.png" alt="Screenshot 2020-09-22 153752.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-22 154013.png" style="width: 673px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41007i16AF93FECF7BCDD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-22 154013.png" alt="Screenshot 2020-09-22 154013.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 14:41:32 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-09-22T14:41:32Z</dc:date>
    <item>
      <title>Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746001#M721359</link>
      <description>&lt;P&gt;I have a date field in my table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;How do I create Last 7 Days, Last 10 Days, Last 15 Days and Last 30 Days Date range for the date field in the script?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Lets say the date is 9/22/2020/ I want Last 7 Days to count from 9/22/2020 - 7 days. Similarly for 10, 15, 30 Days&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746001#M721359</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2024-11-15T23:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746028#M721360</link>
      <description>&lt;P&gt;I use Henric's&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_self"&gt;As-Of-Table&lt;/A&gt;&amp;nbsp;, it works really well.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 13:32:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746028#M721360</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-09-22T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746035#M721361</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;That is not my requirement. Henric's method works for Rolling Sum or averages. It does not create Date Ranges on the script level or on UI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is simple. Create Date Range for Last 7, 10, 15, 30 Days for a Date Field I have in the Script itself.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 13:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746035#M721361</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-09-22T13:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746042#M721362</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Assumed your Date field name is "Date" you can use actual field name as per your data

AllDates:
load fieldvalue('Date',recno()) as Date
autogenerate fieldvaluecount('Date');

AsOfDate:
load
Date as AsOfDate,
Date,
'Current Day' as Date_Type
Resident AllDates;

concatenate(AsOfDate)
load
Date as AsOfDate,
Date + 1 - IterNo() as Date,
'Last 7 Days' as Date_Type
Resident AllDates
while IterNo() &amp;lt;= 7;

concatenate(AsOfDate)
load
Date as AsOfDate,
Date + 1 - IterNo() as Date,
'Last 10 Days' as Date_Type
Resident AllDates
while IterNo() &amp;lt;= 10;

concatenate(AsOfDate)
load
Date as AsOfDate,
Date + 1 - IterNo() as Date,
'Last 15 Days' as Date_Type
Resident AllDates
while IterNo() &amp;lt;= 15;

concatenate(AsOfDate)
load
Date as AsOfDate,
Date + 1 - IterNo() as Date,
'Last 30 Days' as Date_Type
Resident AllDates
while IterNo() &amp;lt;= 30;

right join load Date Resident AllDates;

drop table AllDates;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can now use &lt;STRONG&gt;Date_Type&lt;/STRONG&gt; and &lt;STRONG&gt;AsOfDate&lt;/STRONG&gt; as selections ro get the expected output&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746042#M721362</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-22T14:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746059#M721363</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even this does not seem to work. It is assigning 'Current Day', 'Last 10 Days', 'Last 15 Days', 'Last 30 Days' to every date in the Date field instead.&lt;/P&gt;&lt;P&gt;So when I select Last 10 Days, it also shows dates from last year&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746059#M721363</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-09-22T14:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746069#M721364</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp; I am not sure you already tried it or not but it is what I am getting&amp;nbsp; as you can see in below screenshots which is what you need if I understood correctly&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-22 153752.png" style="width: 724px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41006iC3AE9E3CB35F761E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-22 153752.png" alt="Screenshot 2020-09-22 153752.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-09-22 154013.png" style="width: 673px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41007i16AF93FECF7BCDD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-09-22 154013.png" alt="Screenshot 2020-09-22 154013.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746069#M721364</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-22T14:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746078#M721365</link>
      <description>&lt;P&gt;Here is mine. And now I get Table not found error&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746078#M721365</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-09-22T14:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date range in the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746108#M721366</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/9788"&gt;@qlikwiz123&lt;/a&gt;&amp;nbsp; few changes required. see the attched&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 16:07:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-range-in-the-Script/m-p/1746108#M721366</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-22T16:07:28Z</dc:date>
    </item>
  </channel>
</rss>

