<?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: Compare and Calculate the Values from Previous Row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393671#M423379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me to achieve the above mentioned scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lawrance A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Sep 2017 14:40:04 GMT</pubDate>
    <dc:creator>lawrance</dc:creator>
    <dc:date>2017-09-22T14:40:04Z</dc:date>
    <item>
      <title>Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393670#M423378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to compare and calculate the below scenarios.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="74" style="border: 1px solid #000000; width: 100px; height: 61px;"&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;Total&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;5000&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid #000000; width: 82px; height: 83px;" width="80"&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;Actual&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to achieve the below calculation in QlikView Script.&lt;/P&gt;&lt;P&gt;Final Table&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="106" style="border: 1px solid #000000; width: 284px; height: 108px;"&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;Remaining&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Calculations&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4900&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;(5000) - &lt;STRONG&gt;Actual&lt;/STRONG&gt;(100)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4700&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;Remaining&lt;/STRONG&gt;(4900) - &lt;STRONG&gt;Actual&lt;/STRONG&gt;(200)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4400&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;Remaining&lt;/STRONG&gt;() - &lt;STRONG&gt;Actual&lt;/STRONG&gt;(300)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lawrance A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2017 22:57:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393670#M423378</guid>
      <dc:creator>lawrance</dc:creator>
      <dc:date>2017-09-21T22:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393671#M423379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me to achieve the above mentioned scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lawrance A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 14:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393671#M423379</guid>
      <dc:creator>lawrance</dc:creator>
      <dc:date>2017-09-22T14:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393672#M423380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here you go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 15:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393672#M423380</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2017-09-22T15:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393673#M423381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Total&lt;/P&gt;&lt;P&gt;5000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(Total)&lt;/P&gt;&lt;P&gt;Actual:&lt;/P&gt;&lt;P&gt;LOAD *, RecNo() AS RowCnt INLINE [&lt;/P&gt;&lt;P&gt;Actual&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;300&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET value = NoOfRows('Total');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;TotalCount:&lt;/P&gt;&lt;P&gt;LOAD RowCnt, Actual, IF(RowCnt &amp;lt; '$(value)', Peek(Total) - Actual, Total) AS Total &lt;/P&gt;&lt;P&gt;Resident Total;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Total;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;Resident TotalCount&lt;/P&gt;&lt;P&gt;WHERE Len(Trim(RowCnt)) &amp;lt;&amp;gt; 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table TotalCount;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 15:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393673#M423381</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-09-22T15:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393674#M423382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me how to convert the below expression into QlikView Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=If(RowNo() = 1, (TotalValue - Max({&amp;lt;Seq={'1'}&amp;gt;}ActualValue)), (TotalValue - RangeSum(Above(TOTAL RangeSum(ActualValue), 0, RowNo(TOTAL)))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Lawrance A&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 02:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393674#M423382</guid>
      <dc:creator>lawrance</dc:creator>
      <dc:date>2017-09-23T02:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393675#M423383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is QlikView file. Do you mean in QlikSense&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 02:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393675#M423383</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2017-09-23T02:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393676#M423384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh You want to do in script instead of in chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 02:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393676#M423384</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2017-09-23T02:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and Calculate the Values from Previous Row</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393677#M423385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Seems Vishwa has given you the code with slight play and alters you can make it more dynamic. Like trying sum of the field to calculate totals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Sep 2017 05:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-Calculate-the-Values-from-Previous-Row/m-p/1393677#M423385</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2017-09-23T05:18:43Z</dc:date>
    </item>
  </channel>
</rss>

