<?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: Custom weeks in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505709#M4710</link>
    <description>&lt;P&gt;Create a variable vWeekNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vWeekNumber =&amp;nbsp; if(Date(&lt;SPAN&gt;Week_st ) = Date(01/10/2018) and Date(Week_end&amp;nbsp;) = Date (05/10/2018) , Week1,&amp;nbsp;if(Date(Week_st ) = Date(06/10/2018) and Date(Week_end&amp;nbsp;) = Date (12/10/2018) , Week2,&amp;nbsp;if(Date(Week_st ) = Date(13/10/2018) and Date(Week_end&amp;nbsp;) = Date (25/10/2018) , Week3)))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2018 06:11:50 GMT</pubDate>
    <dc:creator>swapnilk</dc:creator>
    <dc:date>2018-11-14T06:11:50Z</dc:date>
    <item>
      <title>Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505698#M4705</link>
      <description>Hi experts,&lt;BR /&gt;I have data like below&lt;BR /&gt;Week_st Week_end week&lt;BR /&gt;01/10/2018 05/10/2018 Week1&lt;BR /&gt;06/10/2018 12/10/2018 Week2&lt;BR /&gt;13/10/2018 25/10/2018 Week3&lt;BR /&gt;&lt;BR /&gt;I want to creat week nunbers like week1,2,3,... based on above data&lt;BR /&gt;&lt;BR /&gt;Expecting like below&lt;BR /&gt;Week_st Week_end week&lt;BR /&gt;01/10/2018 05/10/2018 Week1&lt;BR /&gt;06/10/2018 12/10/2018 Week2&lt;BR /&gt;13/10/2018 25/10/2018 Week3&lt;BR /&gt;01/10/2017 05/10/2017 Week1&lt;BR /&gt;06/10/2017 12/10/2017 Week2&lt;BR /&gt;13/10/2017 25/10/2017 Week3&lt;BR /&gt;&lt;BR /&gt;Please help</description>
      <pubDate>Wed, 14 Nov 2018 05:50:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505698#M4705</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T05:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505709#M4710</link>
      <description>&lt;P&gt;Create a variable vWeekNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vWeekNumber =&amp;nbsp; if(Date(&lt;SPAN&gt;Week_st ) = Date(01/10/2018) and Date(Week_end&amp;nbsp;) = Date (05/10/2018) , Week1,&amp;nbsp;if(Date(Week_st ) = Date(06/10/2018) and Date(Week_end&amp;nbsp;) = Date (12/10/2018) , Week2,&amp;nbsp;if(Date(Week_st ) = Date(13/10/2018) and Date(Week_end&amp;nbsp;) = Date (25/10/2018) , Week3)))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 06:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505709#M4710</guid>
      <dc:creator>swapnilk</dc:creator>
      <dc:date>2018-11-14T06:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505713#M4711</link>
      <description>&lt;P&gt;If you already have week in source data then why you want to repeat it??&lt;/P&gt;&lt;P&gt;Sorry but I am not getting your question. Your source data and expected output look same except it's repeatation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 06:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505713#M4711</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-11-14T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505736#M4720</link>
      <description>Thanks for the reply. This week_st and week_end are alvailable for 2018. I have to populate week numbers for 2017 also. So to get 2017 dates i have used addmonths() function. Now in my week_st and week_end have 2018 and 2017. But I want add week numbers to 2017 also</description>
      <pubDate>Wed, 14 Nov 2018 06:40:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505736#M4720</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T06:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505738#M4722</link>
      <description>&lt;P&gt;Hello Vivek,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see a difference in your data and the requirement. Please rectify.&lt;/P&gt;&lt;P&gt;I assume you have two dates column (Week_st, Week_end) and you need &lt;STRONG&gt;month wise week number&lt;/STRONG&gt; as your output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;load * Inline&lt;BR /&gt;[&lt;BR /&gt;Week_st,Week_end&lt;BR /&gt;01/10/2018,07/10/2018&lt;BR /&gt;08/10/2018,14/10/2018&lt;BR /&gt;15/10/2018,21/10/2018&lt;BR /&gt;22/10/2018,28/10/2018&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;T2:&lt;BR /&gt;load Week_st, Week_end,&lt;BR /&gt;'Week'&amp;amp;&lt;BR /&gt;if(week(date#(Week_st,'DD/MM/YYYY'))-week(monthstart(date#(Week_st,'DD/MM/YYYY')))+1&amp;gt;1,&lt;BR /&gt;week(date#(Week_st,'DD/MM/YYYY'))-week(monthstart(date#(Week_st,'DD/MM/YYYY')))+1,&lt;BR /&gt;'1')&lt;BR /&gt;as week&lt;BR /&gt;Resident T1;&lt;/P&gt;&lt;P&gt;drop Table T1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Amardeep.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 06:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505738#M4722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-14T06:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505741#M4724</link>
      <description>Thanks for the reply. Yes, my source have week numbers but it is onky for 2018. I need for 2017 also.&lt;BR /&gt;In my report I have to show report on weekly basis. If we pivot, under week1, i’m ge Only 2018. But i need 2018 and 2017 data together under weeks</description>
      <pubDate>Wed, 14 Nov 2018 06:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505741#M4724</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T06:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505750#M4727</link>
      <description>&lt;P&gt;Is date for year 2017 already present in your data? do you have any other catch than this??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share more sample data. try below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load week_st,&lt;/P&gt;&lt;P&gt;week_end,&lt;/P&gt;&lt;P&gt;week&lt;/P&gt;&lt;P&gt;from&amp;nbsp; tableName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load AddYears(week_st,-1) as week_st,&lt;/P&gt;&lt;P&gt;AddYears(week_end,-1) as week_end,&lt;/P&gt;&lt;P&gt;week&lt;/P&gt;&lt;P&gt;from&amp;nbsp; tableName;&lt;/P&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 06:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505750#M4727</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-11-14T06:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505758#M4730</link>
      <description>I have main data for all years.&lt;BR /&gt;But calandar will be defined only for current year like week_st and week_end. I can get 2017 calndar using addmonths() function for the same dates period for another’s year. You just used addyears() and I used addmonths() thats fine. Now how can I add week numbers to 2017</description>
      <pubDate>Wed, 14 Nov 2018 06:56:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505758#M4730</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T06:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505761#M4732</link>
      <description>Attached is the weekly report I’m expecting</description>
      <pubDate>Wed, 14 Nov 2018 06:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505761#M4732</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T06:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505770#M4734</link>
      <description>&lt;P&gt;Have you tried that script&lt;/P&gt;&lt;P&gt;It will work. Week is already get added as per current year week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 07:03:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505770#M4734</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2018-11-14T07:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505791#M4742</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD DATE(Date#(Week_st,'DD/MM/YYYY')) as Week_st, DATE(Date#(Week_end,'DD/MM/YYYY')) as Week_end, week INLINE [&lt;BR /&gt;Week_st, Week_end, week&lt;BR /&gt;01/10/2018, 05/10/2018, Week1&lt;BR /&gt;06/10/2018, 12/10/2018, Week2&lt;BR /&gt;13/10/2018, 25/10/2018, Week3&lt;BR /&gt;];&lt;BR /&gt;Join(Data)&lt;BR /&gt;LOAD addyears (Week_st,-1) as Week_st,addyears (Week_end,-1) as Week_end,week Resident Data;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 237px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71i64F03247D9CED172/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 07:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505791#M4742</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-11-14T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505797#M4745</link>
      <description>&lt;P&gt;Hi Please try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD DATE(Date#(Week_st,'DD/MM/YYYY')) as Week_st, DATE(Date#(Week_end,'DD/MM/YYYY')) as Week_end, week INLINE [&lt;BR /&gt;Week_st, Week_end, week&lt;BR /&gt;01/10/2018, 05/10/2018, Week1&lt;BR /&gt;06/10/2018, 12/10/2018, Week2&lt;BR /&gt;13/10/2018, 25/10/2018, Week3&lt;BR /&gt;];&lt;BR /&gt;Join(Data)&lt;BR /&gt;LOAD addyears (Week_st,-1) as Week_st,addyears (Week_end,-1) as Week_end,week Resident Data;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 237px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72iA585C34F29F57D21/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 07:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505797#M4745</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-11-14T07:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505811#M4753</link>
      <description>Thanks for the reply. It is working fine.&lt;BR /&gt;Here I have date when I add week to pivot I’m not getting 2017 data.</description>
      <pubDate>Wed, 14 Nov 2018 07:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505811#M4753</guid>
      <dc:creator>viveksingh</dc:creator>
      <dc:date>2018-11-14T07:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505844#M4774</link>
      <description>&lt;P&gt;Please select Correct and Helpful to close the thread. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 08:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1505844#M4774</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-11-14T08:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom weeks</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1506784#M5127</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please try like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD Year(DATE(Date#(Week_st,'DD/MM/YYYY')) ) as Year,DATE(Date#(Week_st,'DD/MM/YYYY')) as Week_st,&lt;BR /&gt;DATE(Date#(Week_end,'DD/MM/YYYY')) as Week_end, week&lt;BR /&gt;INLINE [&lt;BR /&gt;Week_st, Week_end, week&lt;BR /&gt;01/10/2018, 05/10/2018, Week1&lt;BR /&gt;06/10/2018, 12/10/2018, Week2&lt;BR /&gt;13/10/2018, 25/10/2018, Week3&lt;BR /&gt;];&lt;BR /&gt;Join(Data)&lt;BR /&gt;LOAD Year(addyears (Week_st,-1)) as Year,addyears (Week_st,-1) as Week_st,addyears (Week_end,-1) as Week_end,week&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 895px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/267i79FFF2690B792594/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 660px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/266i5AF81E4E24C4CE81/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 03:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Custom-weeks/m-p/1506784#M5127</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2018-11-15T03:51:01Z</dc:date>
    </item>
  </channel>
</rss>

