<?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 Week Number Based on Current Week in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Week-Number-Based-on-Current-Week/m-p/1323143#M834367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help me on this...&amp;nbsp; My objective is to get the weeknumber based on current week until week 52..&amp;nbsp; IF More than week 52, it&amp;nbsp; will be flagged as&amp;nbsp; '52+'.&amp;nbsp;&amp;nbsp; However, based on&amp;nbsp; my formula below, the week counter continues even when there is a gap on the MonDate.&amp;nbsp; Pls. see below my desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([Monday for Date] &amp;lt; weekstart(today(1)),0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([Monday for Date] = weekstart(today(1)),1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([Monday for Date]&amp;lt;&amp;gt; weekstart(Peek([Monday for Date])),rangesum(peek([Week Number]),1),Peek([Week Number])))) as [Week Number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my desired output :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; slips the week number if there is a gap&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Flagged week no to 52+ if weej number is more than&amp;nbsp; 52.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/166003_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt; Thank you in advance !&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>Week Number Based on Current Week</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Number-Based-on-Current-Week/m-p/1323143#M834367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help me on this...&amp;nbsp; My objective is to get the weeknumber based on current week until week 52..&amp;nbsp; IF More than week 52, it&amp;nbsp; will be flagged as&amp;nbsp; '52+'.&amp;nbsp;&amp;nbsp; However, based on&amp;nbsp; my formula below, the week counter continues even when there is a gap on the MonDate.&amp;nbsp; Pls. see below my desired output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([Monday for Date] &amp;lt; weekstart(today(1)),0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([Monday for Date] = weekstart(today(1)),1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([Monday for Date]&amp;lt;&amp;gt; weekstart(Peek([Monday for Date])),rangesum(peek([Week Number]),1),Peek([Week Number])))) as [Week Number]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my desired output :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; slips the week number if there is a gap&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Flagged week no to 52+ if weej number is more than&amp;nbsp; 52.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/166003_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt; Thank you in advance !&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/Week-Number-Based-on-Current-Week/m-p/1323143#M834367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number Based on Current Week</title>
      <link>https://community.qlik.com/t5/QlikView/Week-Number-Based-on-Current-Week/m-p/1323144#M834368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Requirement by creating ageing buckets on week number field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 06:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-Number-Based-on-Current-Week/m-p/1323144#M834368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-07T06:10:59Z</dc:date>
    </item>
  </channel>
</rss>

