<?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: Last 4 Weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384442#M807880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hello&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;first create Week Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Week(MakeDate(year,month,day_number)) as Week&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&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;Use Following Expression&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;Sum({&amp;lt;Week = {"&amp;gt;=$(=Max(Week-3)) &amp;lt;= $(=Max(Week))"}&amp;gt;} Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2017 05:23:51 GMT</pubDate>
    <dc:creator>vikasdesai</dc:creator>
    <dc:date>2017-10-18T05:23:51Z</dc:date>
    <item>
      <title>Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384440#M807878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a line graph by weeks. In order for me to do this I had to create a date field based on the fields I already had. The expression is as follows:&amp;nbsp; =Week(MakeDate(YEAR,MONTH,DAY_NUMBER))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works and I created week numbers however in the line graph I only want to show the last 4 weeks. How would I add this to my expression above? &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/Last-4-Weeks/m-p/1384440#M807878</guid>
      <dc:creator>mparker123</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384441#M807879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script, you need to create week field like&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;&lt;STRONG&gt;Week(MakeDate(YEAR,MONTH,DAY_NUMBER)) as Week&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Measure, as follow&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Week = {"&amp;gt;=$(=Max(Week-4)) &amp;lt;= $(=Max(Week))"}&amp;gt;} Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 01:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384441#M807879</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-18T01:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384442#M807880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hello&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;first create Week Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Week(MakeDate(year,month,day_number)) as Week&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&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;Use Following Expression&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;Sum({&amp;lt;Week = {"&amp;gt;=$(=Max(Week-3)) &amp;lt;= $(=Max(Week))"}&amp;gt;} Measure)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 05:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384442#M807880</guid>
      <dc:creator>vikasdesai</dc:creator>
      <dc:date>2017-10-18T05:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384443#M807881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, alternatively&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; WeekStart(Today())-WeekStart(MakeDate(YEAR,MONTH,DAY_NUMBER))&amp;lt;28,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Week(MakeDate(YEAR,MONTH,DAY_NUMBER)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Null()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 11:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384443#M807881</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2017-10-18T11:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384444#M807882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Henric as the expression works. However, I would now like to take this a step further and only show the top 10 lets say of this. How would i incorporate the RANK function into this expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 14:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384444#M807882</guid>
      <dc:creator>mparker123</dc:creator>
      <dc:date>2017-10-18T14:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last 4 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384445#M807883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, to show the top 10 can easily be done by using "Dimension Limiits" (third tab in the bar chart properties in QlikView). This is the easiest way to solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you can use Rank(). Note however that my formula defines a field or a dimension, so it can be used either in the script or directly as a chart dimension. Rank(), however, is something that is calculated, so it can only be used in the measure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can combine my previous formula with the following as measure:&lt;/P&gt;&lt;P&gt;If(Rank(Sum(Amount))&amp;lt;=10,Sum(Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 14:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-4-Weeks/m-p/1384445#M807883</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2017-10-18T14:56:02Z</dc:date>
    </item>
  </channel>
</rss>

