<?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 Running Balance in a Pivot table, what's wrong with my code!!!!! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246736#M94030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am making a pivot table and attempting to have the last column hold a running balance based on the other columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I want in plain English:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF this is the first row, THEN take a field called 'JuneStartBal' and add to that value the Sum of a field called 'TotalRecByItem' then subtract from that the sum of a field called TotalReqByItem. ELSE (if this is not the first row), get the value from the previous row and add to that value the Sum of a field called 'TotalRecByItem' then subtract from that the sum of a field called TotalReqByItem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my broken code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(rowno()=1, JuneStartBal + (Sum ([TotalRecByItem])) - (Sum ([TotalReqByItem]) ), peek(Rowno() -1) + (Sum ([TotalRecByItem]) - (Sum ([TotalReqByItem]))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me!!! Thanks to all who assist!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2011 21:49:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-30T21:49:28Z</dc:date>
    <item>
      <title>Running Balance in a Pivot table, what's wrong with my code!!!!!</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246736#M94030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am making a pivot table and attempting to have the last column hold a running balance based on the other columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I want in plain English:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF this is the first row, THEN take a field called 'JuneStartBal' and add to that value the Sum of a field called 'TotalRecByItem' then subtract from that the sum of a field called TotalReqByItem. ELSE (if this is not the first row), get the value from the previous row and add to that value the Sum of a field called 'TotalRecByItem' then subtract from that the sum of a field called TotalReqByItem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my broken code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(rowno()=1, JuneStartBal + (Sum ([TotalRecByItem])) - (Sum ([TotalReqByItem]) ), peek(Rowno() -1) + (Sum ([TotalRecByItem]) - (Sum ([TotalReqByItem]))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me!!! Thanks to all who assist!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 21:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246736#M94030</guid>
      <dc:creator />
      <dc:date>2011-06-30T21:49:28Z</dc:date>
    </item>
    <item>
      <title>Running Balance in a Pivot table, what's wrong with my code!!!!!</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246737#M94031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; stumped&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 16:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246737#M94031</guid>
      <dc:creator />
      <dc:date>2011-07-01T16:25:31Z</dc:date>
    </item>
    <item>
      <title>Running Balance in a Pivot table, what's wrong with my code!!!!!</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246738#M94032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; ttt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2011 22:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246738#M94032</guid>
      <dc:creator />
      <dc:date>2011-07-01T22:31:03Z</dc:date>
    </item>
    <item>
      <title>Running Balance in a Pivot table, what's wrong with my code!!!!!</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246739#M94033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; One last try, I always stump this forum &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 15:09:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Balance-in-a-Pivot-table-what-s-wrong-with-my-code/m-p/246739#M94033</guid>
      <dc:creator />
      <dc:date>2011-07-05T15:09:21Z</dc:date>
    </item>
  </channel>
</rss>

