<?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 52 Weeks Totals in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166151#M38205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have been asked to do totals based on a rolling 52 weeks window by employee hours/activity&lt;/P&gt;&lt;P&gt;For example, I would want to select a week, ie. April 11 2010 (field name: PPEND_DT) for a particular employee (EMP_ID) and see their total amount of sick (EARNING_CODE) hours (DAY_ACTIVITY) for the last 52 weeks. I would want to see the total for that particular week, then the total for the last 52 weeks on a pivot chart&lt;/P&gt;&lt;P&gt;Then I should be able to select April 18, 2010 for the same criteria and see the last 52 weeks total beside that particular weeks activity.&lt;/P&gt;&lt;P&gt;I think this should be something simple, but I just can't get it to work the way I want. I've tried rangesum, but it doesn't seem to be giving me to totals anywhere close to what I am expecting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 15:16:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-18T15:16:17Z</dc:date>
    <item>
      <title>Rolling 52 Weeks Totals</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166151#M38205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have been asked to do totals based on a rolling 52 weeks window by employee hours/activity&lt;/P&gt;&lt;P&gt;For example, I would want to select a week, ie. April 11 2010 (field name: PPEND_DT) for a particular employee (EMP_ID) and see their total amount of sick (EARNING_CODE) hours (DAY_ACTIVITY) for the last 52 weeks. I would want to see the total for that particular week, then the total for the last 52 weeks on a pivot chart&lt;/P&gt;&lt;P&gt;Then I should be able to select April 18, 2010 for the same criteria and see the last 52 weeks total beside that particular weeks activity.&lt;/P&gt;&lt;P&gt;I think this should be something simple, but I just can't get it to work the way I want. I've tried rangesum, but it doesn't seem to be giving me to totals anywhere close to what I am expecting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 15:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166151#M38205</guid>
      <dc:creator />
      <dc:date>2010-08-18T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Rolling 52 Weeks Totals</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166152#M38206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alas, Dates are not QlikView's strength, so it actually isn't simple, even if it should be.&lt;/P&gt;&lt;P&gt;If you're forced to select one and only one week, you could use set analysis. Exact syntax will depend on how your weeks are defined, but hopefully you get the basic idea.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(Sales) // sales for selected week&lt;BR /&gt;sum({&amp;lt;Week={"&amp;gt;$(=date(Week-7*52)) &amp;lt;=$(=Week)"}&amp;gt; Sales) // Sales for past 52 weeks&lt;/P&gt;&lt;P&gt;If you want to be able to see multiple weeks at once, with rolling 52 weeks for each, I'd do it with data:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;As of Week, Type, Week&lt;BR /&gt;20100822, This Week, 20100822&lt;BR /&gt;20100822, 52 Weeks, 20100822&lt;BR /&gt;20100822, 52 Weeks, 20100815&lt;BR /&gt;20100822, 52 Weeks, 20100808&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Then use As of Week and Type as chart dimensions, and sum(Sales) as the expression.&lt;/P&gt;&lt;P&gt;Lots of variations on the theme. Depends on what you specifically need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 00:19:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166152#M38206</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-08-19T00:19:07Z</dc:date>
    </item>
    <item>
      <title>Rolling 52 Weeks Totals</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166153#M38207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;We had a similar issue with some of our charts, most of our data is held by year &amp;amp; week and the problem was if I wanted to go back 8 weeks it was fine for week 9 &amp;amp; above simply minus 1 from the week number and display that, unfortunately if it wanted to span years this did not work, we tried doing this with dates and found the solution to be quite messy. The option we finally took was when we create our calendar table use a simple iteration of the day/week numbers, so now if we need to go back for any period of time we know the day/week number where we started and just take of the required number of days/weeks. This might/might not be feasible for yourselves but I thought I share our decision ...&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Gav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 09:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-52-Weeks-Totals/m-p/166153#M38207</guid>
      <dc:creator />
      <dc:date>2010-08-19T09:55:18Z</dc:date>
    </item>
  </channel>
</rss>

