<?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 Get last week when this week has no data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836635#M294245</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;If today is Wednesday for example, and I want to get the full last week's revenue, I use this which works:&lt;/P&gt;&lt;P&gt;=money(sum({&amp;lt;YEARWEEK={'$(vYEARWEEK)'},Product={'ENERGY'}&amp;gt;} [REVENUE]),'£#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;where vYEARWEEK=max(YEARWEEK)-1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, for some products, there is no data for this week. Then the above set analysis returns the revenue from 2 weeks ago (as opposed to 1 week ago), which is wrong. How do I ensure it returns one week ago no matter what?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2015 13:48:29 GMT</pubDate>
    <dc:creator>sifatnabil</dc:creator>
    <dc:date>2015-04-01T13:48:29Z</dc:date>
    <item>
      <title>Get last week when this week has no data</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836635#M294245</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;If today is Wednesday for example, and I want to get the full last week's revenue, I use this which works:&lt;/P&gt;&lt;P&gt;=money(sum({&amp;lt;YEARWEEK={'$(vYEARWEEK)'},Product={'ENERGY'}&amp;gt;} [REVENUE]),'£#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;where vYEARWEEK=max(YEARWEEK)-1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, for some products, there is no data for this week. Then the above set analysis returns the revenue from 2 weeks ago (as opposed to 1 week ago), which is wrong. How do I ensure it returns one week ago no matter what?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 13:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836635#M294245</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-04-01T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get last week when this week has no data</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836636#M294246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't believe that QV gives you the revenue for some products 2 or more weeks ago.&lt;/P&gt;&lt;P&gt;In variable vYEARWEEK the result for today ist 201513&lt;/P&gt;&lt;P&gt;and this value is set in your setanalysis as yearweek definition&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 14:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836636#M294246</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2015-04-01T14:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get last week when this week has no data</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836637#M294247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iam nit sure if set analysis is possible in where condition, but I would try&lt;/P&gt;&lt;P&gt;where vYEARWEEK=max({&amp;lt;youproductfield=&amp;gt;}YEARWEEK-1)&lt;/P&gt;&lt;P&gt;this should take the previous year regardless of any products&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 14:07:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-week-when-this-week-has-no-data/m-p/836637#M294247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-01T14:07:16Z</dc:date>
    </item>
  </channel>
</rss>

