<?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 Returning last x weeks/days - set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235108#M874838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I always return the last 'X' number of days/weeks/etc in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I'm trying to return the last 4 weeks, but I don't believe my results are accurate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the piece of code I'm using currently..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;{&amp;lt;Model2.Week_Res&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=( week(date(today(0)))))&amp;gt;=$(=( week(date(today(0) - 4))))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;where Model2.Week_Res is the week #. To ensure this only pulls the latest year, I'll include Model2.Year_Res&amp;nbsp; = MAX year&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>lucasdavis500</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Returning last x weeks/days - set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235108#M874838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I always return the last 'X' number of days/weeks/etc in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I'm trying to return the last 4 weeks, but I don't believe my results are accurate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the piece of code I'm using currently..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;{&amp;lt;Model2.Week_Res&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=( week(date(today(0)))))&amp;gt;=$(=( week(date(today(0) - 4))))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;where Model2.Week_Res is the week #. To ensure this only pulls the latest year, I'll include Model2.Year_Res&amp;nbsp; = MAX year&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235108#M874838</guid>
      <dc:creator>lucasdavis500</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Returning last x weeks/days - set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235109#M874839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Duke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;Model2.Year_Res={'$(=Max(Year))'}, Model2.Week_Res={''&amp;gt;=$(=Week(Today(0))-4)&amp;lt;=$(=Week(Today(0)))'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the attachment you will get an idea as how expression works. I used to check my expressions like this.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="143610" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143610_Capture.PNG" style="height: 135px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 03:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235109#M874839</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-11-11T03:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Returning last x weeks/days - set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235110#M874840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamil, this doesn't seem to answer the question I've posed. Your QVW is excluding the most recent 4 weeks, I want everything excluded EXCEPT the most recent four weeks. I've tinkered with your formula and still have not been able to get my charts to return the proper values..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 14:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235110#M874840</guid>
      <dc:creator>lucasdavis500</dc:creator>
      <dc:date>2016-11-11T14:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Returning last x weeks/days - set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235111#M874841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or may be you can use Date field and&amp;nbsp; WeekStart(Max(Date)-28) &amp;amp; &lt;SPAN style="font-size: 13.3333px;"&gt;WeekStart(Max(Date)) as your two min &amp;amp; max parameters. You can play with number '28' to fit your requirement.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 15:25:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235111#M874841</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-11-11T15:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Returning last x weeks/days - set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235112#M874842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also you can try&lt;/P&gt;&lt;P&gt;Right(WeekName(max(Date)),2)-4 &amp;amp; Right(WeekName(max(Date)),2) as your min &amp;amp; max parameter respectively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 15:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-last-x-weeks-days-set-analysis/m-p/1235112#M874842</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2016-11-11T15:27:48Z</dc:date>
    </item>
  </channel>
</rss>

