<?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 Re: Previous year sales for the same weeks in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692084#M52872</link>
    <description>&lt;P&gt;Hi Raz,&lt;/P&gt;&lt;P&gt;if you can provide some example data then I think I might be able to help with this.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Apr 2020 16:16:18 GMT</pubDate>
    <dc:creator>usamabinsadiq</dc:creator>
    <dc:date>2020-04-08T16:16:18Z</dc:date>
    <item>
      <title>Previous year sales for the same weeks</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1691818#M52860</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a bit of a challenge with the following scenario:&lt;/P&gt;&lt;P&gt;Data set is aggregated at a WeekStart Level (lowest level) - I'm deriving the month and year from this date. The user wants to select Year and Month, let's say 2020 - May and see the Sales for last year - same weeks by Product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if May 2020 has 5 weeks by WeekStart I would want to show the Sales for the same weeks previous year irrespective of the fact that one of the weeks might fall into June 2019. Remember that only one Year is always selected and Month has one or several months always selected and the final table is made of Product, Sales this Period and Sales Previous Year.&lt;/P&gt;&lt;P&gt;Hope it makes sense, any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Raz&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:32:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1691818#M52860</guid>
      <dc:creator>campos_rsc</dc:creator>
      <dc:date>2021-12-20T21:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year sales for the same weeks</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692084#M52872</link>
      <description>&lt;P&gt;Hi Raz,&lt;/P&gt;&lt;P&gt;if you can provide some example data then I think I might be able to help with this.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 16:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692084#M52872</guid>
      <dc:creator>usamabinsadiq</dc:creator>
      <dc:date>2020-04-08T16:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year sales for the same weeks</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692209#M52880</link>
      <description>&lt;P&gt;Please find attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So again, for the previous year I don't want the Week 18 to be included in the calculation when selecting May 2020.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 23:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692209#M52880</guid>
      <dc:creator>campos_rsc</dc:creator>
      <dc:date>2020-04-08T23:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year sales for the same weeks</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692291#M52887</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please see the result, I think you were looking for this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Previous Year Sale for same weeks.jpg" style="width: 661px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31565i43AD6602E5AFCCD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Previous Year Sale for same weeks.jpg" alt="Previous Year Sale for same weeks.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Measure Expressions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//Sales this Period
Sum({&amp;lt;Year={$(=max(Year))}&amp;gt;} Sales)

//Sales Previous Year
Sum({&amp;lt;Year={$(=max(Year)-1)},Week={"$(= '&amp;lt;=' &amp;amp; max(Week) &amp;amp; '&amp;gt;=' &amp;amp; min(Week) )"}&amp;gt;} Sales)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 09:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692291#M52887</guid>
      <dc:creator>usamabinsadiq</dc:creator>
      <dc:date>2020-04-09T09:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year sales for the same weeks</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692570#M52933</link>
      <description>&lt;P&gt;Perfect, works as expected.&lt;/P&gt;&lt;P&gt;Thank you, much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 05:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-year-sales-for-the-same-weeks/m-p/1692570#M52933</guid>
      <dc:creator>campos_rsc</dc:creator>
      <dc:date>2020-04-10T05:13:55Z</dc:date>
    </item>
  </channel>
</rss>

