<?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 Rolling weeks calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236676#M87830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roland,&lt;/P&gt;&lt;P&gt;Thank you for the response, but I was thinking of the solution provided by Henry, as that was what came to my mind first when I looked at the requirement.&lt;/P&gt;&lt;P&gt;Henry can you please tell me more about the vmaxweek variable as in I did a vmaxweek = week(today()) and is this correct and I also when I have a dimension as TIME_PERIOD_WEEK_NO, so should I create a variable specific to this dimension?? Can you explain this further please?&lt;/P&gt;&lt;P&gt;I think its around this, however if unable to get it then I will post a sample QVW to make you people understand it better.&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2011 17:59:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-03T17:59:14Z</dc:date>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236668#M87822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I think its a basic query, but still tough as I am new to this. I have a chart which shows sales vs forecast for 52 weeks. However the requirement is this needs to be rolling 52 weeks, as in currently in week 10 for 2011, then the chart should show backwards till the week 11 for 2010, how can I achieve this?? Currently I have this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TIME_PERIOD_WEEK_NO&amp;gt;}INV_GROSS_REV)&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 14:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236668#M87822</guid>
      <dc:creator />
      <dc:date>2011-03-02T14:49:20Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236669#M87823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not quite sure what you can't achieve, but I'll give it a try:&lt;/P&gt;&lt;P&gt;- Limit the dimension (= TIME_PERIOD_WEEK_NO) from the current week till the current week - 52.&lt;/P&gt;&lt;P&gt;-Probably you will still see week 1 till 52 (where 1 till 10 is 2011 and 11 till 52 is 2010) in the chart. I solved this by renaming it to year-week (e.g. 2010 50), in that way you can still sort in the right way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 15:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236669#M87823</guid>
      <dc:creator />
      <dc:date>2011-03-02T15:08:26Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236670#M87824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick reply, I have a Year week dimension as well, but how do I do the current - 52 weeks for rolling weeks calculation in the expression. Can you help me with this further please??&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 15:13:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236670#M87824</guid>
      <dc:creator />
      <dc:date>2011-03-02T15:13:33Z</dc:date>
    </item>
    <item>
      <title>AW:Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236671#M87825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello new_user3,&lt;/P&gt;&lt;P&gt;I think you want always start from current date(week) and then go back 52 weeks. My suggestion isn't totally correct because I am going back twelve month instead of 52 weeks, but at least it should bring you into the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt; TIME_PERIOD_WEEK_NO= { "$(= '&amp;lt;=' &amp;amp; week(addmonths( today(), -12)) &amp;amp; year(addmonths( today(), -12)) )" } &amp;gt;} INV_GROSS_REV)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;E.g. replace your TIME_PERIOD_WEEK_NO with the according rolling week and update the syntax to it.&lt;/P&gt;&lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 15:33:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236671#M87825</guid>
      <dc:creator />
      <dc:date>2011-03-02T15:33:57Z</dc:date>
    </item>
    <item>
      <title>AW:Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236672#M87826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roland,&lt;/P&gt;&lt;P&gt;Thank you for the response, I have the same Time dimension ID for week and I used the below expression, nothing seems to be working though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;B&gt;sum&lt;/B&gt;({&amp;lt; &lt;B&gt;TIME_PERIOD_WEEK_NO&lt;/B&gt;= { &lt;B&gt;&lt;I&gt;"$(= '&amp;lt;=' &amp;amp; week(addmonths( today(), -12)) &amp;amp; year(addmonths( today())"&lt;/I&gt;&lt;/B&gt;}&amp;gt;}&lt;B&gt;INV_GROSS_REV&lt;/B&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Could you please help me further with this? I am thinking if I am missing any variables or anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 15:53:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236672#M87826</guid>
      <dc:creator />
      <dc:date>2011-03-02T15:53:57Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236673#M87827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi new_user,&lt;/P&gt;&lt;P&gt;your expression seems to be ok. Be sure that the format of &lt;B&gt;TIME_PERIOD_WEEK_NO&lt;/B&gt; and your search-string (the result of "$(=...)") match together. E.g. the existance of leading zeros or trailing blanks and so on may be missleading; "09-2010" is not the same as "9-2010" and also not equal to "092010".&lt;/P&gt;&lt;P&gt;Hint: If you don't use the label (leave it empty) QV will show you exactly the result of the according expression within the label. This can be usefull during testing. If you don't reach your goal, don't hesitate to send a little (anonymized) application to look into it.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 16:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236673#M87827</guid>
      <dc:creator />
      <dc:date>2011-03-03T16:30:28Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236674#M87828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I two variables.&lt;/P&gt;&lt;P&gt;vmaxweek = latest week&lt;BR /&gt;vweeksago = how many weeks you want to go back (i.e. 52)&lt;/P&gt;&lt;P&gt;This expression works for me.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Week={"&amp;gt;$(=$(vmaxweek)-$(vmaxweeksago)) &amp;lt;=$(vmaxweek)"}&amp;gt;} Sales)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 16:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236674#M87828</guid>
      <dc:creator />
      <dc:date>2011-03-03T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236675#M87829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created two variables.&lt;/P&gt;&lt;P&gt;vmaxweek = latest week&lt;BR /&gt;vweeksago = how many weeks you want to go back (i.e. 52)&lt;/P&gt;&lt;P&gt;This expression works for me.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Week={"&amp;gt;$(=$(vmaxweek)-$(vmaxweeksago)) &amp;lt;=$(vmaxweek)"}&amp;gt;} Sales)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 16:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236675#M87829</guid>
      <dc:creator />
      <dc:date>2011-03-03T16:41:18Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236676#M87830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roland,&lt;/P&gt;&lt;P&gt;Thank you for the response, but I was thinking of the solution provided by Henry, as that was what came to my mind first when I looked at the requirement.&lt;/P&gt;&lt;P&gt;Henry can you please tell me more about the vmaxweek variable as in I did a vmaxweek = week(today()) and is this correct and I also when I have a dimension as TIME_PERIOD_WEEK_NO, so should I create a variable specific to this dimension?? Can you explain this further please?&lt;/P&gt;&lt;P&gt;I think its around this, however if unable to get it then I will post a sample QVW to make you people understand it better.&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 17:59:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236676#M87830</guid>
      <dc:creator />
      <dc:date>2011-03-03T17:59:14Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236677#M87831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like your 'TIME_PERIOD_WEEK_NO' is a number series that corresponds with weeks. If it is indeed a number series (e.g. week 1 of 2010 = 1, week 2 of 2010 = 2....week 52 of 2010 =52, week 1 of 2011 = 53 etc.), then you can use the suggestion I provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To take an example, let's say you're starting from the 1st week of 2011 (week 53 according to the series mentioned above) and want to sum up the last 52 weeks.&lt;/P&gt;&lt;P&gt;In your load script just create the two variables:&lt;/P&gt;&lt;P&gt;SET vmaxweek = 53;&lt;BR /&gt;&lt;BR /&gt;SET vminus = 52;&lt;/P&gt;&lt;P&gt;Then create the input box so that they can be changed/referenced in your dashboard.&lt;/P&gt;&lt;P&gt;The expression you should put into your table is:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;TIME_PERIOD_WEEK_NO={"&amp;gt;$(=$(vmaxweek)-$(vminus))&amp;lt;=$(vmaxweek)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;hope this works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 20:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236677#M87831</guid>
      <dc:creator />
      <dc:date>2011-03-03T20:06:09Z</dc:date>
    </item>
    <item>
      <title>Rolling weeks calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236678#M87832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;BR /&gt;Even this doesnt seem to have solved the problem I have. I will explain again I need to show a chart with current - 52 weeks of data at any time. which would be like starting from year 2010, weeks 15,16,17,18,19,20...... to Year 2011 Current Week 16. The problem I have is that the chart should show 2 expressions, one for SALES and other for FORECAST. The sales is only till current week but the forecast data is for full year. so in the chart its showing current year forecast full 53 weeks and sales only till week 16. How do i fix it to show both the data only till Current week - 52 weeks?&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Will provide more info if needed.&lt;/P&gt;&lt;P&gt;ANDY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 12:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-weeks-calculation/m-p/236678#M87832</guid>
      <dc:creator />
      <dc:date>2011-04-11T12:07:30Z</dc:date>
    </item>
  </channel>
</rss>

