<?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 Last 6 weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140125#M373745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a week dimension like below which is actually in a sql script at the back end. I have created a bar chart using that week dimension which is bringing all weeks on x-axis. But I want to see only last 6 weeks on the x-axis dynamically. Is there any way I can write an expression on "Add Calculated Dimension" under Dimension tab in Chart properties?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Weekstart&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;04 Jan 16&lt;/P&gt;&lt;P&gt;11 Jan 16&lt;/P&gt;&lt;P&gt;18 Jan 16&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;06 Jun 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQl scrip&lt;/STRONG&gt;t: convert(varchar(11),DATEADD(wk, DATEDIFF(wk,0,Createdate), 0),6) as Weekstart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 10:12:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-17T10:12:06Z</dc:date>
    <item>
      <title>Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140125#M373745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a week dimension like below which is actually in a sql script at the back end. I have created a bar chart using that week dimension which is bringing all weeks on x-axis. But I want to see only last 6 weeks on the x-axis dynamically. Is there any way I can write an expression on "Add Calculated Dimension" under Dimension tab in Chart properties?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Weekstart&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;04 Jan 16&lt;/P&gt;&lt;P&gt;11 Jan 16&lt;/P&gt;&lt;P&gt;18 Jan 16&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;06 Jun 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQl scrip&lt;/STRONG&gt;t: convert(varchar(11),DATEADD(wk, DATEDIFF(wk,0,Createdate), 0),6) as Weekstart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140125#M373745</guid>
      <dc:creator />
      <dc:date>2016-06-17T10:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140126#M373746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be use set analysis to your existing expression instead of a calculated dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;Weekstart = {"$(='&amp;gt;=' &amp;amp; Date(Max(Weekstart) - 42, 'DD MMM YY') &amp;amp; '&amp;lt;=' &amp;amp; &lt;SPAN style="font-size: 13.3333px;"&gt;Date(Max(Weekstart), 'DD MMM YY')&lt;/SPAN&gt;)"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140126#M373746</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T10:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140127#M373747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it should be 6 instead of 42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;Weekstart = {"$(='&amp;gt;=' &amp;amp; Date(Max(Weekstart) -6, 'DD MMM YY') &amp;amp; '&amp;lt;=' &amp;amp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date(Max(Weekstart), 'DD MMM YY')&lt;/SPAN&gt;)"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks &amp;amp; Regards&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Chintan &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140127#M373747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-17T10:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140128#M373748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it needs to be 42 because I am going back 42 days back and not 6 weeks back in my expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140128#M373748</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T10:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140129#M373749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks for your replies. I don't think it will work. I want to restrict Weekstart at chart level only. In other words, I want to bring all weeks from backend and show only last 6 weeks data in bar chart. Any other alternative?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140129#M373749</guid>
      <dc:creator />
      <dc:date>2016-06-17T10:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Last 6 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140130#M373750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The proposed solution is doing exactly that my friend. I am not using a where clause in the script. This is set analysis for chart expression to restrict it to show only last 6 week's worth of data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-6-weeks/m-p/1140130#M373750</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-17T10:49:39Z</dc:date>
    </item>
  </channel>
</rss>

