<?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: Re: compare day to day before in a straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795568#M473396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it workes great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but can you please explain me how is it working???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2014 12:13:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-10T12:13:31Z</dc:date>
    <item>
      <title>compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795560#M473388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to create an expression that will show me the sum of a field but in the previus day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date -1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;sum cost of Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG style="color: #ffffff; text-align: center;"&gt;sum cost of Date -1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4.11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to develop&amp;nbsp; th&lt;SPAN style="color: #575757;"&gt;&lt;SPAN style="color: #000000;"&gt;e [&lt;STRONG style="text-align: center; color: #800000;"&gt;sum cost of Date -1&lt;/STRONG&gt;]&lt;/SPAN&gt; expression in t&lt;/SPAN&gt;his table but &lt;STRONG style=": ; font-size: 12pt; text-decoration: underline;"&gt;without using the Above() \ Below() Functions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2014 17:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795560#M473388</guid>
      <dc:creator />
      <dc:date>2014-11-09T17:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795561#M473389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide some sample data....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2014 17:37:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795561#M473389</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-09T17:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795562#M473390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so can see some sample data in the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my table has 2 fields: date (dimension) and cost (measure)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795562#M473390</guid>
      <dc:creator />
      <dc:date>2014-11-10T07:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795563#M473391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Move calculations to the load script and you will achieve the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you'd like a solution, please share a sample of your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795563#M473391</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T07:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795564#M473392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is a sample data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795564#M473392</guid>
      <dc:creator />
      <dc:date>2014-11-10T07:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795565#M473393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Solution here&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #941100;"&gt;&lt;SPAN style="color: #000000;"&gt;Time_Filters:&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Date') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Date-1]&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Cost') &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Cost-1]&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Date,Cost&lt;BR /&gt; 01/11/2014,10,&lt;BR /&gt; 02/11/2014,20,&lt;BR /&gt; 03/11/2014,30,&lt;BR /&gt; 04/11/2014,40,&lt;BR /&gt; 05/11/2014,50,&lt;BR /&gt; 06/11/2014,60,&lt;BR /&gt; 07/11/2014,70&lt;BR /&gt; ]&lt;SPAN style="color: #000000;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795565#M473393</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T07:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795566#M473394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be more precise &lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New'; color: #941100;"&gt;&lt;SPAN style="color: #000000;"&gt;Time_Filters:&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;isNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Date')), &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;Date&lt;SPAN style="color: #000000;"&gt;)-1), &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Date')) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Date-1]&lt;SPAN style="color: #000000;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;isNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Cost')),0,&lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;('Cost')) &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Cost-1]&lt;SPAN style="color: #000000;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0433ff;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;[Date,Cost&lt;BR /&gt; 01/11/2014,10,&lt;BR /&gt; 02/11/2014,20,&lt;BR /&gt; 03/11/2014,30,&lt;BR /&gt; 04/11/2014,40,&lt;BR /&gt; 05/11/2014,50,&lt;BR /&gt; 06/11/2014,60,&lt;BR /&gt; 07/11/2014,70&lt;BR /&gt; ]&lt;SPAN style="color: #000000;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795566#M473394</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T07:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795567#M473395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this way i am updated the Lubranski code for previous Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TableName:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *,if(IsNull(Peek('Date')),Date( Date - 1 ), Peek('Date')) AS PrevDate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(IsNull(Peek('Cost')),0, Peek('Cost')) AS PrevCost; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Date#(Date,'DD/MM/YYYY') AS Date,Cost; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date,Cost&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;01/11/2014,10,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;02/11/2014,20,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;03/11/2014,30,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;04/11/2014,40,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;05/11/2014,50,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;06/11/2014,60,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;07/11/2014,70&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you get the table data as&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="70819" alt="PrevRec.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70819_PrevRec.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795567#M473395</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-11-10T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795568#M473396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it workes great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but can you please explain me how is it working???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 12:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795568#M473396</guid>
      <dc:creator />
      <dc:date>2014-11-10T12:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: compare day to day before in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795569#M473397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Peek() function get the value from the previous row. &lt;/P&gt;&lt;P&gt;IsNull test is needed because Peek() returns Null() for the first row, but it's better to put 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find more information here &lt;A href="https://community.qlik.com/docs/DOC-4073"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 15:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-day-to-day-before-in-a-straight-table/m-p/795569#M473397</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T15:20:52Z</dc:date>
    </item>
  </channel>
</rss>

