<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906341#M1014089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having a hard time understanding why the formula wasn't working. &lt;A _jive_internal="true" href="https://community.qlik.com/people/petter-s"&gt;Petter Skjolden&lt;/A&gt;‌ do you know why the date formatting was creating a problem??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Apr 2015 13:42:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-04-26T13:42:44Z</dc:date>
    <item>
      <title>Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906333#M1014078</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;How to find last 5 days depending selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex: I have below data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="137"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="73"&gt;Tr_Date&lt;/TD&gt;&lt;TD width="64"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;01-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;02-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;03-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;04-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;05-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;06-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;07-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;08-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;09-05-2015&lt;/TD&gt;&lt;TD align="right"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filter is Tr_ Date&lt;/P&gt;&lt;P&gt;Straight table: Dim - Tr_Date, Expression - ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so If I select Tr_Date-6th then I need 2 to 6 sales.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 12:25:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906333#M1014078</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-04-26T12:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906334#M1014079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this in your set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;Tr_Date = {"&amp;gt;= $(=Date(Max(Tr_Date) - 4, 'DD-MM-YYYY')) &amp;lt;= &lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(=Date(Max(Tr_Date), 'DD-MM-YYYY'))&lt;/SPAN&gt;"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think -4 should work to reach 2nd May, but if not try it with -5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 12:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906334#M1014079</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-26T12:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906335#M1014080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls try the below expression if it works fine then give me correct answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Tr_Date={"&amp;gt;=$(=max(Tr_Date))&amp;lt;=$(=max(Tr_Date)+4)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;prabhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906335#M1014080</guid>
      <dc:creator>prabhas277</dc:creator>
      <dc:date>2015-04-26T13:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906336#M1014081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its not working I am attaching my app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906336#M1014081</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-04-26T13:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906337#M1014082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hi SunIndia,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Its not working I am attaching my app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906337#M1014082</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-04-26T13:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906338#M1014084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Created a variable vVar = &lt;STRONG style="color: #ff0000;"&gt;='&amp;gt;=' &amp;amp; Date(Max(Tr_Date) - 4, 'DD-MM-YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(Tr_Date), 'DD-MM-YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use this as your expression: &lt;STRONG style="color: #ff0000;"&gt;=Sum({&amp;lt;Tr_Date = {'$(vVar)'}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also find attached the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906338#M1014084</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-26T13:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906339#M1014086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A tweaking of SunIndia's suggestion should work for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Sum( {&amp;lt;Tr_Date = {"&amp;lt;=$(=Date(Num(Max(Tr_Date))))&amp;gt;$(=Date(Max(Tr_Date)-4)))"}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leaving out the formatting parameter for the Date() function will default to the formatting of dates that is currently active for your settings on your computer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906339#M1014086</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-04-26T13:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906340#M1014088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please attach your application then it will very clear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906340#M1014088</guid>
      <dc:creator>prabhas277</dc:creator>
      <dc:date>2015-04-26T13:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906341#M1014089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having a hard time understanding why the formula wasn't working. &lt;A _jive_internal="true" href="https://community.qlik.com/people/petter-s"&gt;Petter Skjolden&lt;/A&gt;‌ do you know why the date formatting was creating a problem??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906341#M1014089</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-26T13:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906342#M1014091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum( {$ &amp;lt;Tr_Date = {"&amp;gt;=$(=Date(Max(Tr_Date)-4))&amp;lt;=$(=Date(Max(Tr_Date)))"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85058_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:53:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906342#M1014091</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-04-26T13:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906343#M1014093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works for me, see attached.&amp;nbsp; I used set from &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌ with minor adjustments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 13:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906343#M1014093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-26T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906344#M1014095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it is because the Tr_Date will have the formatted date to whatever the client (or server) is set to as formatting and then try to compare it with the formatted dates in the search string - which will not work I guess ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas a Date-number should always be safe to compare since it is not subject to formatting settings. I guess the parsing routine for the search string will discover that it is purely date-numbers and then it will use the date-number of Tr_Date instead of it's formatted part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906344#M1014095</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-04-26T14:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906345#M1014096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That sounds like a good reason, but my only concern is that what if during the load we have done something like Date(Tr_Date, 'DD-MM-YYYY'), in which case Date() function alone will depart from what has been in the load if the system date is different to DD-MM-YYYY, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like a hit and trial method for dates within set analysis, sometimes something work and on other times the same solution won't work. I always struggle to use set analysis on a date field. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906345#M1014096</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-26T14:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Last 5 Days</title>
      <link>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906346#M1014097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunindia,&lt;/P&gt;&lt;P&gt;Thanks its working. &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/msolomov"&gt;msolomov&lt;/A&gt;‌is aslo said right.&lt;SPAN class="icon-status-icon icon-partner" style="margin: 0 0 0 4px; font-weight: inherit; font-style: inherit; font-size: 11.6999998092651px; font-family: inherit;" title="Partner"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-5-Days/m-p/906346#M1014097</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-04-26T14:56:08Z</dc:date>
    </item>
  </channel>
</rss>

