<?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 8 Weeks on a Chart (Variables) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750982#M1028985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I nearly forgot - define the variables as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Date(Max(DATE))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vPrior8WeekPeriod:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;=Date(RangeMax(vMaxDate - 56, Min({1} DATE)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the = sign is part of the variable!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Feb 2015 12:17:43 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-02-19T12:17:43Z</dc:date>
    <item>
      <title>Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750976#M1028979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to create my charts to show the last 8 weeks of data by using variables.&lt;/P&gt;&lt;P&gt;I have created the following variables:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78513_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;So on a chart I want to see the weeks between these dates ie - 8 weeks of data. (I want to avoid using the dimension limits as I have a view to selecting the number of weeks to be seen on the chart ie 12, 16 etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used this expression on my chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({$&amp;lt;DATE={'$(vPrior8WeekPeriod)'}&amp;gt;}[Amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However it plots just that date (25/11/2014 in this case). I am looking for the 8 weeks between the 25th &amp;amp; 20th.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 10:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750976#M1028979</guid>
      <dc:creator />
      <dc:date>2015-02-19T10:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750977#M1028980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=SUM( {&amp;lt;DATE={'&amp;gt;= $(vPrior8WeekPeriod) &amp;lt;= &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(vMaxDate)&lt;/SPAN&gt;'}&amp;gt;} [Amount] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make sure you have same format for MaxDate and Prior8WeekPeriod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 11:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750977#M1028980</guid>
      <dc:creator>AbhijitBansode</dc:creator>
      <dc:date>2015-02-19T11:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750978#M1028981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have changed the formats to match, but it hasn't quite worked yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/78516_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;It gives me a 'no data to display'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 11:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750978#M1028981</guid>
      <dc:creator />
      <dc:date>2015-02-19T11:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750979#M1028982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikView considers value in variable as string not as a date, you will need to convert that string into date and hten only you can compare that value with DATE. Something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DATE&lt;/SPAN&gt;={"&amp;gt;= $(=Date#(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vPrior8WeekPeriod&lt;/SPAN&gt;,'DD-MM-YYYY')) &amp;lt;= $(=Date#(vMaxDate,'DD-MM-YYYY'))"} &amp;gt;} Amnt)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 11:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750979#M1028982</guid>
      <dc:creator>AbhijitBansode</dc:creator>
      <dc:date>2015-02-19T11:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750980#M1028983</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;Try to create like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WeekStart={'&amp;gt;=$(=Date(vWeekSelect)) &amp;lt;=$(=Date(vWeekSelect-8*7))'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vWeekSelect = &lt;/P&gt;&lt;P&gt;=Weekstart(Date(if((GetFieldSelections(Year)=Year(Today()) AND GetSelectedCount(Month)=0 AND GetSelectedCount(Qtr_No)=0&lt;/P&gt;&lt;P&gt;AND GetSelectedCount(DATE)=0 AND GetSelectedCount(WeekStart)=0&lt;/P&gt;&lt;P&gt;),Today(),Min(DATE))),0,-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeharsha V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 11:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750980#M1028983</guid>
      <dc:creator />
      <dc:date>2015-02-19T11:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750981#M1028984</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;Assuming all the date formats are the same, then this will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;DATE={"&amp;gt;=$(vPrior8WeekPeriod) &amp;lt;=$(vMaxDate)"}&amp;gt;} [Amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not include extra spaces in the set expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 12:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750981#M1028984</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-02-19T12:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750982#M1028985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I nearly forgot - define the variables as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Date(Max(DATE))&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vPrior8WeekPeriod:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;=Date(RangeMax(vMaxDate - 56, Min({1} DATE)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the = sign is part of the variable!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 12:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750982#M1028985</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-02-19T12:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 8 Weeks on a Chart (Variables)</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750983#M1028986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, works well!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 12:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-8-Weeks-on-a-Chart-Variables/m-p/750983#M1028986</guid>
      <dc:creator />
      <dc:date>2015-02-19T12:28:29Z</dc:date>
    </item>
  </channel>
</rss>

