<?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: Rolling current 4 weeks and past 4 weeks flag in scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239379#M393782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maxgro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am writing below code in script :&lt;/P&gt;&lt;P&gt;Time:&lt;/P&gt;&lt;P&gt;LOAD WEEK_ID, &lt;/P&gt;&lt;P&gt; if(WEEK_ID= match(WEEK_ID, 5, 6, 7, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; ,1,0) as flagpast,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WEEK_ID= match(WEEK_ID, 1, 2, 3, 4),1,0) as flagcurrent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WEEK_DT, &lt;/P&gt;&lt;P&gt;Getting below values for both the fields:&lt;/P&gt;&lt;P&gt;Why only 0 value for flag past?:Why this behaviour?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143728_Image1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2016 21:01:12 GMT</pubDate>
    <dc:creator>mayankraoka</dc:creator>
    <dc:date>2016-11-11T21:01:12Z</dc:date>
    <item>
      <title>Rolling current 4 weeks and past 4 weeks flag in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239377#M393780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data for 13 weeks having week id from 1 to 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate rolling 4 weeks volume and growth.For this I know to calculate the rolling 4 weeks(Which include week 13,12,11,10) on expression level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution ,I am looking to calculate flags for Current rolling 4 weeks(&lt;SPAN style="font-size: 13.3333px;"&gt;(wk id=13,12,11,10)&lt;/SPAN&gt;) and past rolling 4 weeks(wk id=9,8,7,6)&lt;/P&gt;&lt;P&gt;in the script .Instead of calculating them om expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me how to do this in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239377#M393780</guid>
      <dc:creator>mayankraoka</dc:creator>
      <dc:date>2016-11-11T20:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling current 4 weeks and past 4 weeks flag in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239378#M393781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you already have the week id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match(weekid, 13, 12, 11, 10) as flagcurrent&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;match(weekid, 9, 8, 7, 6)&amp;nbsp; as flagpast&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 20:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239378#M393781</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-11-11T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling current 4 weeks and past 4 weeks flag in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239379#M393782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maxgro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am writing below code in script :&lt;/P&gt;&lt;P&gt;Time:&lt;/P&gt;&lt;P&gt;LOAD WEEK_ID, &lt;/P&gt;&lt;P&gt; if(WEEK_ID= match(WEEK_ID, 5, 6, 7, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; ,1,0) as flagpast,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(WEEK_ID= match(WEEK_ID, 1, 2, 3, 4),1,0) as flagcurrent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WEEK_DT, &lt;/P&gt;&lt;P&gt;Getting below values for both the fields:&lt;/P&gt;&lt;P&gt;Why only 0 value for flag past?:Why this behaviour?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143728_Image1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239379#M393782</guid>
      <dc:creator>mayankraoka</dc:creator>
      <dc:date>2016-11-11T21:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling current 4 weeks and past 4 weeks flag in scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239380#M393783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143750_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Week:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load rowno() as WEEK_ID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 13;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Time:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; WEEK_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; if(match(WEEK_ID, 9, 8, 7, 6),1,0) as flagpast,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(match(WEEK_ID, 13, 12, 11, 10),1,0) as flagcurrent&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Week;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Nov 2016 11:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-current-4-weeks-and-past-4-weeks-flag-in-scripting/m-p/1239380#M393783</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-11-12T11:46:49Z</dc:date>
    </item>
  </channel>
</rss>

