<?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: Help to SET Analysis - get past 4 weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713839#M256919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion - but cant make it work.&lt;/P&gt;&lt;P&gt;Why cant you do something without the variables, - like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now))'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now)-1)'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now)-2)'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;this doesnt work, - maybe my lack of knowledge to SET Analysis&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2014 12:15:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-29T12:15:38Z</dc:date>
    <item>
      <title>Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713833#M256913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to show the last 4 weeks sale in a pivot table and cant just figure out how to.&lt;/P&gt;&lt;P&gt;Of course I can show the field weeknumber and make a count sold items.&lt;/P&gt;&lt;P&gt;But I dont want to filter at all.&lt;/P&gt;&lt;P&gt;Is there a way to make a SET Analysis with something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;COUNT( {$&amp;lt; weeknumber = { '&amp;lt;= lastweek', lastweek-1, lastweek-2, lastweek-3 } &amp;gt;}solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I know its wrong but I hope it shows what I mean&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713833#M256913</guid>
      <dc:creator />
      <dc:date>2014-07-21T06:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713834#M256914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;COUNT( {$&amp;lt; weeknumber = { "&amp;gt;= $(=week(today())-4)&amp;lt;=$(=week(today()))" } &amp;gt;}solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713834#M256914</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2014-07-21T06:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713835#M256915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a datefield in your datamodel then try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=COUNT( {&amp;lt; WeekDimensionName=, MonthDimensionName=, DateDimensionName= { "&amp;gt;= $(=weekStart(today(),-4))&amp;lt;=$(=WeekEnd(today(), -1))" } &amp;gt;}solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:29:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713835#M256915</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-07-21T06:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713836#M256916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this not just give me solditems 4 weeks ago – I need 1 week ago, 2weeks ago, 3 weeks ago and 4 weeks ago&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fra: Mohit Sahrma &lt;/P&gt;&lt;P&gt;Sendt: 21. juli 2014 08:24&lt;/P&gt;&lt;P&gt;Til: Schou, Hans Henrik Søren (SSC009)&lt;/P&gt;&lt;P&gt;Emne: Re:  - Help to SET Analysis - get past 4 weeks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlik Community&amp;lt;http://community.qlik.com/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help to SET Analysis - get past 4 weeks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from Mohit Sahrma&amp;lt;http://community.qlik.com/people/ER.Mohit?et=watches.email.thread&amp;gt; in App Development - View the full discussion&amp;lt;http://community.qlik.com/message/572243?et=watches.email.thread#572243&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 07:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713836#M256916</guid>
      <dc:creator />
      <dc:date>2014-07-21T07:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713837#M256917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need to have 4 different expression columns all with different set analysis functions to get this. I would set up variables called vCureentWeek,...,vCurrentWeek-3 with the formulae&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;week(now())&lt;/P&gt;&lt;P&gt;week(now())-1&lt;/P&gt;&lt;P&gt;week(now())-2&lt;/P&gt;&lt;P&gt;week(now())-3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then set up your 4 expressions as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Count({$&amp;lt;weeknumber = {'$(vCurrentWeek)'}&amp;gt;} solditems)&lt;/P&gt;&lt;P&gt;(Count({$&amp;lt;weeknumber = {'$(vCurrentWeek-1)'}&amp;gt;} solditems)&lt;/P&gt;&lt;P&gt;(Count({$&amp;lt;weeknumber = {'$(vCurrentWeek-2)'}&amp;gt;} solditems)&lt;/P&gt;&lt;P&gt;(Count({$&amp;lt;weeknumber = {'$(vCurrentWeek-3)'}&amp;gt;} solditems)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 07:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713837#M256917</guid>
      <dc:creator>matthewjbryant</dc:creator>
      <dc:date>2014-07-21T07:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713838#M256918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=SUM({&amp;lt;Month = , Year = , Quarter = , Date = {'&amp;gt;=$(=Date(WeekStart(Today())-28))&amp;lt;=$(=Date(WeekEnd(Today())-7))'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give your Last 4 Weeks Sales... Not included current week... !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2014 08:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713838#M256918</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-21T08:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713839#M256919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestion - but cant make it work.&lt;/P&gt;&lt;P&gt;Why cant you do something without the variables, - like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now))'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now)-1)'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;weeknumber = {'(week(now)-2)'}&amp;gt;} solditems)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;this doesnt work, - maybe my lack of knowledge to SET Analysis&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 12:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713839#M256919</guid>
      <dc:creator />
      <dc:date>2014-07-29T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713840#M256920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soren, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must set the variables first to use them in your expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your menu,&amp;nbsp;&amp;nbsp;&amp;nbsp; Settings-&amp;gt; Variable Overview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you add one variable for current week (you can use vCurrentWeek as variable name, and see the expression to get the value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=week(today())&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;After that, you can use the variable in your expressions as Matthew suggested:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;weeknumber = {$(vCurrentWeek)}&amp;gt;} solditems)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;weeknumber = {$(vCurrentWeek)-1}&amp;gt;} solditems)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;weeknumber = {$(vCurrentWeek)-2}&amp;gt;} solditems)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;weeknumber = {$(vCurrentWeek)-3}&amp;gt;} solditems)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I think there is no need to use quotes but you can try it anyway. &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps, regards&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 13:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713840#M256920</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2014-07-29T13:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713841#M256921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right - the quotes are not needed. I don't know why I got into that habit, but both work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did Jose's advise help you find the variable settings &lt;A href="https://community.qlik.com/qlik-users/25863"&gt;Søren Schou&lt;/A&gt;? I've never been able to do this without variables so I would always use that method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 13:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713841#M256921</guid>
      <dc:creator>matthewjbryant</dc:creator>
      <dc:date>2014-07-29T13:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713842#M256922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need quotes when you need to evaluate a string instead of a number, I am assuming that &lt;STRONG&gt;weeknumber&lt;/STRONG&gt; field is in a number format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 14:22:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713842#M256922</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2014-07-29T14:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help to SET Analysis - get past 4 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713843#M256923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;thanx both&lt;/P&gt;&lt;P&gt;I got it working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didnt write the variable right, - missed the =&lt;/P&gt;&lt;P&gt;after that all variables worked and I´m happy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 06:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-to-SET-Analysis-get-past-4-weeks/m-p/713843#M256923</guid>
      <dc:creator />
      <dc:date>2014-07-30T06:20:31Z</dc:date>
    </item>
  </channel>
</rss>

