<?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: need only last 4 four weeks data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921961#M650371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do it either in calculated dimension or in Expression using set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;calculated Dimension:&lt;/P&gt;&lt;P&gt;if (week(yourdatefield)&amp;gt;=week(max(yourdatefield))-4 and week(max(yourdatefield), week(yourdatefield)&lt;/P&gt;&lt;P&gt;expression&lt;/P&gt;&lt;P&gt;sum({&amp;lt;yourdatefield={'&amp;gt;=$(=weekstart(week(max(yourdatefield))-4)&amp;lt;=$(=weekend(week(max(yourdatefield))'}&amp;gt;}&lt;/P&gt;&lt;P&gt;Be Aware that weeks before week 4 will not goback to previous year week (eg 52)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have a weekfield the expressions can be easier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 07:12:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-13T07:12:04Z</dc:date>
    <item>
      <title>need only last 4 four weeks data</title>
      <link>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921959#M650369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to qlikview. &lt;/P&gt;&lt;P&gt;Here is my requirement&lt;/P&gt;&lt;P&gt;I nee to display last 4 weeks data from max(date) only and it should roll up week wise. Here date I am getting as time stamp.&lt;/P&gt;&lt;P&gt;I know how to get week wise data. But problem is to get last 4 weeks data only.&lt;/P&gt;&lt;P&gt;Can somebody help me on this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nanada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 05:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921959#M650369</guid>
      <dc:creator />
      <dc:date>2015-08-13T05:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: need only last 4 four weeks data</title>
      <link>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921960#M650370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a table with the week as the dimension, and the following expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({&amp;lt;datefield = {"&amp;gt;=$(Date(Max(datefield) - 28)) &amp;lt;=$(=Date(Max(datefield)))"}&amp;gt;} metricfield)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace datefield and metricfield with the correct fieldnames.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921960#M650370</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-13T07:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: need only last 4 four weeks data</title>
      <link>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921961#M650371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do it either in calculated dimension or in Expression using set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;calculated Dimension:&lt;/P&gt;&lt;P&gt;if (week(yourdatefield)&amp;gt;=week(max(yourdatefield))-4 and week(max(yourdatefield), week(yourdatefield)&lt;/P&gt;&lt;P&gt;expression&lt;/P&gt;&lt;P&gt;sum({&amp;lt;yourdatefield={'&amp;gt;=$(=weekstart(week(max(yourdatefield))-4)&amp;lt;=$(=weekend(week(max(yourdatefield))'}&amp;gt;}&lt;/P&gt;&lt;P&gt;Be Aware that weeks before week 4 will not goback to previous year week (eg 52)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have a weekfield the expressions can be easier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921961#M650371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-13T07:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: need only last 4 four weeks data</title>
      <link>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921962#M650372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can let Qlikview take care of some of that, so if a calculated dimension is preferred:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimension: If(datefield &amp;gt;= Max(datefield) - 28 And datefield &amp;lt;= Max(datefield), week(datefield))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression: Sum(metricfield)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(But I think the set analysis on the metric in my first post will be faster if you are dealing with a large data set)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/need-only-last-4-four-weeks-data/m-p/921962#M650372</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-13T07:18:54Z</dc:date>
    </item>
  </channel>
</rss>

