<?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: Loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001157#M645470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;script is in the attachment (.qvw); can you see it or I should post the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2015 08:22:57 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-11-30T08:22:57Z</dc:date>
    <item>
      <title>Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001149#M645457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am new to qlikview not sure how can I perform following functionalities in qlikview (Kindly see the attached image for more information on data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Fix offset:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID number&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Under one ID I have multiple lines of descriptions and related amount1 or amount2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Based on ID number check if any values of amount1 is equal to any values in amount2. If cell value matches then changes values of corresponding rows in total to zero. Like C and -C in attached file to zero. Its not necessary that they can be next to each other.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Loop this on n number of ID number . &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Based on ID I am trying to match values in same colored cells. For example 2000 and -2000. In this fashion I have to check n number of ID.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Nov 2015 22:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001149#M645457</guid>
      <dc:creator />
      <dc:date>2015-11-28T22:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001150#M645458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's your expected result for this data file?&lt;/P&gt;&lt;P&gt;What about the other matching values in this example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Nov 2015 23:08:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001150#M645458</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-11-28T23:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001151#M645459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kindly see the attached image. Since all debit amount matches with credit amount total will be zero for all of them&lt;IMG alt="Result.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107528_Result.png" style="height: 409px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Nov 2015 23:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001151#M645459</guid>
      <dc:creator />
      <dc:date>2015-11-28T23:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001152#M645460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All other lines where debit and credit amount does not match should have total amount as it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Nov 2015 23:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001152#M645460</guid>
      <dc:creator />
      <dc:date>2015-11-28T23:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001153#M645461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; please check the attached file as per u uploaded excel file and let me know what is ur exact requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;gireesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Nov 2015 02:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001153#M645461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-29T02:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001154#M645464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gireesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly see the attached files in below comments. &lt;/P&gt;&lt;P&gt;Requirement: &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Based on ID number check if any values of amount1 is equal to any values in amount2. If cell value matches then changes values of corresponding rows in total to zero. Like C and -C in attached file to zero. Its not necessary that they can be next to each other.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Loop this on n number of ID number &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Nov 2015 14:36:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001154#M645464</guid>
      <dc:creator />
      <dc:date>2015-11-29T14:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001155#M645466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see attachment, result in image, last field, NewTotal&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/107541_1.png" style="height: 337px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Nov 2015 17:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001155#M645466</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-29T17:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001156#M645468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you describe what technique you have applied and how did you achieve the last column as shown above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Nov 2015 17:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001156#M645468</guid>
      <dc:creator />
      <dc:date>2015-11-29T17:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001157#M645470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;script is in the attachment (.qvw); can you see it or I should post the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 08:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001157#M645470</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-30T08:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001158#M645472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;// your data, from excel &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;X:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD ID, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debitAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; creditAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(debitAmount&amp;gt;0, debitAmount, creditAmount) as Amt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(debitAmount&amp;gt;0, 'D', 'C') as Type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Test_Data.xlsx&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is Sheet2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Where len(trim(ID))&amp;gt;0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;// add some test data to your excel (to check different credit/debit amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;//&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; creditAmount - debitAmount as Total,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(debitAmount&amp;gt;0, debitAmount, creditAmount) as Amt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(debitAmount&amp;gt;0, 'D', 'C') as Type;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD div(IterNo()+1,2) as ID, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'desc ' as Description, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Even(iterno()), floor(rand()*100),0) as debitAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(not Even(iterno()), floor(rand()*100),0) as creditAmount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While IterNo() &amp;lt;= 10&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;&lt;STRONG&gt;// read X table order by ID, Amt, Type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// add ID3: ID3 of previous record + 1 if ID, Amt and Type are the same, else ID3=1 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// ID3 is a counter (1, 2, 3) in the group ID, Amt, Type; when ID or Amt or Type change, restart with 1 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Y:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Peek('ID'), Peek('Amt'), Peek('Type'), Peek('ID2'), //subfield(Peek('ID2'),'-',3)+1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Peek('ID')=ID and Peek('Amt')=Amt and Peek('Type')=Type, Peek('ID3')+1, 1) as ID3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident X order by ID, Amt, Type; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// read Y table, just add ID4 as ID-Amt-ID3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Z: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load *, ID &amp;amp; '-' &amp;amp; Amt &amp;amp; '-' &amp;amp; ID3 as ID4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident Y order by ID, Amt, Type; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table X, Y;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this is the Z table &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107616_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;// set 0 debit when ID4 = ID4 of previous record and Type &amp;lt;&amp;gt; Type of prev record&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;// order by Type, so Credit then Debit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;// remember ID4 is the same for same ID, amount (debit/credit); pay attention to the counter (1 2) ath the end of ID4; same ID4, different Type, I can put the amount to 0 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load ID, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debitAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; creditAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID4,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Peek('ID4') = ID4 and Peek('Type') &amp;lt;&amp;gt; Type, 0, debitAmount) as NewDebitAmount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident Z order by ID4, Amt, Type; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// the same but order by Debit, Credit and set 0 in credit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// also add the NewTotal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F2:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load *, NewCreditAmount - NewDebitAmount as NewTotal;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load ID, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debitAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; creditAmount, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID4,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewDebitAmount,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Peek('ID4') = ID4 and Peek('Type') &amp;lt;&amp;gt; Type, 0, creditAmount) as NewCreditAmount&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident F1 order by ID4, Amt, Type desc; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Z, F1;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 12:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001158#M645472</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-30T12:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Loop/m-p/1001159#M645474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I can see it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 13:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop/m-p/1001159#M645474</guid>
      <dc:creator />
      <dc:date>2015-11-30T13:51:44Z</dc:date>
    </item>
  </channel>
</rss>

