<?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 Calendars, Year1+Week1 vs Year2+Week2 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendars-Year1-Week1-vs-Year2-Week2/m-p/280960#M496104</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;One of our main requirements is to be able to report a weeks worth of data from one year against a weeks worth of data from another year (not always the previous year so we need full flexibility, even the week numbers may be different).&amp;nbsp; For example:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012.05 vs 2011.05&lt;/P&gt;&lt;P&gt;2012.02 vs 2010.14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a master calendar which contains calendar date, year, month, week, day, year+week fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data table that contains sales date etc contains the calendar date field so that it is joined to the master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter which i try to pull of year+week data (as in the examples above) I constantly get nothing returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example using the year and week fields seperately in the expression:-&lt;/P&gt;&lt;P&gt;=Sum ({$&amp;lt;CALENDARYEAR={$(vYear1)},CALENDARWEEK={$(vWeek1)&amp;gt;}[SALES-EXTAX])-Sum ({$&amp;lt;CALENDARYEAR={$(vYear1)},CALENDARWEEK={$(vWeek1)&amp;gt;}[COSTOFGOODS])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another attempt has been using concatenated variables that contain YYYY.WW in their value:-&lt;/P&gt;&lt;P&gt;=Sum ({$&amp;lt;CALENDARYEARWEEK={$(vYearWeek1)}&amp;gt;}[SALES-EXTAX])-Sum ({$&amp;lt;CALENDARYEARWEEK={$(vYearWeek1)}&amp;gt;}[COSTOFGOODS])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neither works and I have no idea why, and I'm starting to pull my hair out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions as to either what I'm doing wrong, or be able to point me in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 15:17:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-14T15:17:17Z</dc:date>
    <item>
      <title>Calendars, Year1+Week1 vs Year2+Week2</title>
      <link>https://community.qlik.com/t5/QlikView/Calendars-Year1-Week1-vs-Year2-Week2/m-p/280960#M496104</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;One of our main requirements is to be able to report a weeks worth of data from one year against a weeks worth of data from another year (not always the previous year so we need full flexibility, even the week numbers may be different).&amp;nbsp; For example:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012.05 vs 2011.05&lt;/P&gt;&lt;P&gt;2012.02 vs 2010.14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a master calendar which contains calendar date, year, month, week, day, year+week fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data table that contains sales date etc contains the calendar date field so that it is joined to the master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter which i try to pull of year+week data (as in the examples above) I constantly get nothing returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example using the year and week fields seperately in the expression:-&lt;/P&gt;&lt;P&gt;=Sum ({$&amp;lt;CALENDARYEAR={$(vYear1)},CALENDARWEEK={$(vWeek1)&amp;gt;}[SALES-EXTAX])-Sum ({$&amp;lt;CALENDARYEAR={$(vYear1)},CALENDARWEEK={$(vWeek1)&amp;gt;}[COSTOFGOODS])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another attempt has been using concatenated variables that contain YYYY.WW in their value:-&lt;/P&gt;&lt;P&gt;=Sum ({$&amp;lt;CALENDARYEARWEEK={$(vYearWeek1)}&amp;gt;}[SALES-EXTAX])-Sum ({$&amp;lt;CALENDARYEARWEEK={$(vYearWeek1)}&amp;gt;}[COSTOFGOODS])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neither works and I have no idea why, and I'm starting to pull my hair out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions as to either what I'm doing wrong, or be able to point me in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 15:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendars-Year1-Week1-vs-Year2-Week2/m-p/280960#M496104</guid>
      <dc:creator />
      <dc:date>2012-02-14T15:17:17Z</dc:date>
    </item>
    <item>
      <title>Calendars, Year1+Week1 vs Year2+Week2</title>
      <link>https://community.qlik.com/t5/QlikView/Calendars-Year1-Week1-vs-Year2-Week2/m-p/280961#M496106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen the error in my first set analysis statement - a couple of mising }, but it is strange that the expression editor told me that the expression was ok?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still at a loss why the second variant doesn't work using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 16:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendars-Year1-Week1-vs-Year2-Week2/m-p/280961#M496106</guid>
      <dc:creator />
      <dc:date>2012-02-14T16:23:14Z</dc:date>
    </item>
  </channel>
</rss>

