<?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 Offset Week in Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Offset-Week-in-Expression/m-p/309438#M495615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this one, basically due to the way we calculate the years week numbers this year has a week 1 but last year did not.&amp;nbsp; The desire is to she week one TY but against Week 2 from last year numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot change the week on the source data and as a result have been working with set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On one instance where the user had to select a week i used the below :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$Year = {$(=max(Year)-1)}, Week = {$(=getfieldselections(Week)+1)}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am now trying to do the same offset but on a pivot chart where i have weeks in columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I tried to do a similar set analysis but with no joy ..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({$&amp;lt;Year = {$(=max(Year)-1)}, Week = {$(=Week+1)} &amp;gt;} sales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Feb 2012 17:04:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-22T17:04:40Z</dc:date>
    <item>
      <title>Offset Week in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Offset-Week-in-Expression/m-p/309438#M495615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me with this one, basically due to the way we calculate the years week numbers this year has a week 1 but last year did not.&amp;nbsp; The desire is to she week one TY but against Week 2 from last year numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot change the week on the source data and as a result have been working with set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On one instance where the user had to select a week i used the below :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$Year = {$(=max(Year)-1)}, Week = {$(=getfieldselections(Week)+1)}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am now trying to do the same offset but on a pivot chart where i have weeks in columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I tried to do a similar set analysis but with no joy ..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({$&amp;lt;Year = {$(=max(Year)-1)}, Week = {$(=Week+1)} &amp;gt;} sales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 17:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Offset-Week-in-Expression/m-p/309438#M495615</guid>
      <dc:creator />
      <dc:date>2012-02-22T17:04:40Z</dc:date>
    </item>
  </channel>
</rss>

