<?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 How to generate weeks between two dates? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438491#M798440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have startDate and endDate in my data, how can I create weeks starting from the startDate field and not the start of the year. So, basically I want to populate weeks between the two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438491#M798440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have startDate and endDate in my data, how can I create weeks starting from the startDate field and not the start of the year. So, basically I want to populate weeks between the two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438491#M798440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438492#M798441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *, Week(Date) as Week;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: small;"&gt;&lt;STRONG&gt;LOAD Date(MinDate+IterNo()-1) as Date&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #222222; font-size: small; font-family: arial, sans-serif;"&gt;While MinDate+IterNo()-1 &amp;lt;= MaxDate;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #222222; font-size: small; font-family: arial, sans-serif;"&gt;LOAD Min(startDate) as MinDate,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #222222; font-size: small; font-family: arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(endDate) as MaxDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: small;"&gt;&lt;STRONG&gt;AutoGenerate 1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 12:58:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438492#M798441</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T12:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438493#M798442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laleh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest the method from &lt;A href="https://community.qlik.com/qlik-users/218859"&gt;Anil Babu&lt;/A&gt;. If you want another method you could use a Cartesion join:&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;Try&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ExampleTable:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[StartDate],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[EndDate]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM [source];&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;LEFT JOIN (ExampleTable) LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT [Master Calendar];&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;NOCONCATENATE LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[StartDate],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[EndDate],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WEEK(Date) AS Week&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT ExampleTable&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE DATE(Date ) &amp;gt;= DATE([StartDate]) AND DATE(Date) &amp;lt;= DATE([EndDate])&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&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLE ExampleTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 13:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438493#M798442</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-12-06T13:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438494#M798443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wondering if I have to use resident load instead of autogenerate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438494#M798443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-06T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438495#M798444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * From Table;&lt;/STRONG&gt;&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;&lt;STRONG&gt;CalendarMaster:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD Week(Final_Date) As Week;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Load Date(MinDate + IterNo() -1 ) AS Final_Date While Date(MinDate + IterNo() - 1) &amp;lt;= MaxDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;startDate&lt;/SPAN&gt;) AS MinDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;endDate&lt;/SPAN&gt;) AS MaxDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;RESIDENT Sample;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:19:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438495#M798444</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T14:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438496#M798445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By resident load you can try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15125702207181485" jivemacro_uid="_15125702207181485" modifiedtitle="true"&gt;
&lt;P&gt;let startDate&amp;nbsp; = Num(MakeDate(2015,1,1));&lt;/P&gt;
&lt;P&gt;let endDate&amp;nbsp; = Num(MakeDate(2017,12,30));&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tmpCalendar:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;Date($(startDate) + IterNo() -1) as Date&lt;/P&gt;
&lt;P&gt;AutoGenerate 1&lt;/P&gt;
&lt;P&gt;While Date($(startDate) + IterNo() -1) &amp;lt;= $(endDate);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Calendar:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;*,&lt;/P&gt;
&lt;P&gt;Week(Date) as Week&lt;/P&gt;
&lt;P&gt;Resident tmpCalendar;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tmpCalendar;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438496#M798445</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-06T14:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438497#M798447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this, however my challenge is to create week intervals based off of a period of 84 days. So, essentially my data will only have week 1 to week 12 given the startDate and endDate. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438497#M798447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-06T14:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438498#M798448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it possible to replace the hard coded dates in the variables with my start and end date columns?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:41:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438498#M798448</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-06T14:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438499#M798449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible but keep the name same and check the variable values also will it return [properly or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 14:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438499#M798449</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-06T14:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438500#M798450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, Can you make sample and explain exact result set you want to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 15:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438500#M798450</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T15:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate weeks between two dates?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438501#M798451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anand,I tried the script but the output log shows "Field 'Date' not found".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you take a look once?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 21:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-weeks-between-two-dates/m-p/1438501#M798451</guid>
      <dc:creator>jhstrange</dc:creator>
      <dc:date>2018-10-23T21:39:28Z</dc:date>
    </item>
  </channel>
</rss>

