<?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 5 Days Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519093#M748950</link>
    <description>&lt;P&gt;Thanks Mark! I think I was not able to explain my problem properly, enclosed is&amp;nbsp;an&amp;nbsp;excel table [desired visualization] for better clarification.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 09:35:42 GMT</pubDate>
    <dc:creator>sonu8072</dc:creator>
    <dc:date>2018-12-11T09:35:42Z</dc:date>
    <item>
      <title>Last 5 Days Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519000#M748948</link>
      <description>&lt;P&gt;Hi QV Experts!&lt;/P&gt;&lt;P&gt;I have been trying to wrap my head around this for quite a while now with no success. I have Date,&amp;nbsp;Day, Week, Month and Year defined in the script and want to see 1st 5 Days Sales, In-Between Sales and Last 5 Days Sales in a Pivot Table. But I have been successful in only getting the 1st 5 Days Sales using&amp;nbsp;SUM({&amp;lt;Day={"&amp;lt;=5"}&amp;gt;}Sales), and can get In-Between Sales as a remainder but I am not getting Last 5 Days Sales using -&lt;/P&gt;&lt;P&gt;SUM({&amp;lt; Day={"=(vLastDayofMonth)"}&amp;gt;}Sales_M2) where vLastDayofMonth is defined as&amp;nbsp;MAX(AGGR(Day,Month))&lt;/P&gt;&lt;P&gt;Appreciate the help in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519000#M748948</guid>
      <dc:creator>sonu8072</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519054#M748949</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Normally for things like this i like to flag them in script, it makes the set analysis much easier. try something like this.&lt;BR /&gt;IF(TempDate &amp;lt;= TODAY(1) AND TempDate &amp;gt;= (TODAY(1)-5),1) AS F_ROLLING_5,&lt;BR /&gt;&lt;BR /&gt;Then&lt;BR /&gt;SUM({&amp;lt;F_ROLLING_5={1}&amp;gt;}Sales)&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Tue, 11 Dec 2018 09:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519054#M748949</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2018-12-11T09:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519093#M748950</link>
      <description>&lt;P&gt;Thanks Mark! I think I was not able to explain my problem properly, enclosed is&amp;nbsp;an&amp;nbsp;excel table [desired visualization] for better clarification.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 09:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519093#M748950</guid>
      <dc:creator>sonu8072</dc:creator>
      <dc:date>2018-12-11T09:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519125#M748951</link>
      <description>&lt;P&gt;Making a flag in the script is a good solution unless the users wish to compare periods dynamically. If you have a CalendarDate where the user makes the selection you can filter the expressions using min / max on your Date field. Try the following script and expressions in a test document:&lt;/P&gt;&lt;P&gt;test:&lt;BR /&gt;Load&lt;BR /&gt;date(today()+RowNo()) as CalendarDate,&lt;BR /&gt;date(today()+RowNo()) as Date,&lt;BR /&gt;floor(Rand()*100)+1 as Sales&lt;BR /&gt;AutoGenerate 30;&lt;/P&gt;&lt;P&gt;Last 5 days sales:&lt;BR /&gt;=sum({&amp;lt;Date={"&amp;gt;$(=date(max(Date)-5))"}&amp;gt;*&amp;lt;Date={"&amp;lt;=$(=max(Date))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;First 5 days sales:&lt;BR /&gt;=sum({&amp;lt;Date={"&amp;gt;=$(=min(Date))"}&amp;gt;*&amp;lt;Date={"&amp;lt;$(=date(min(Date)+5))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;Middle sales:&lt;BR /&gt;=sum({&amp;lt;Date={"&amp;lt;$(=date(max(Date)-5))"}&amp;gt;*&amp;lt;Date={"&amp;gt;$(=date(min(Date)+5))"}&amp;gt;}Sales)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 10:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days-Sales/m-p/1519125#M748951</guid>
      <dc:creator>kjhertz</dc:creator>
      <dc:date>2018-12-11T10:00:45Z</dc:date>
    </item>
  </channel>
</rss>

