<?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: Help Needed On : knock off Debit With Credit on Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411324#M153142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it's clear what you require&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is an interesting (and it seems to me quite difficult) challenge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Im unsure how to do it though. Hopefully a QV expert can solve this as it would interest me how to do this (if it can be done)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Oct 2012 10:11:36 GMT</pubDate>
    <dc:creator>robert99</dc:creator>
    <dc:date>2012-10-14T10:11:36Z</dc:date>
    <item>
      <title>Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411319#M153137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table in which customer related Debit : Invoice and Credit : Payment Recd. entries stored. I just want to knock off debit entries with credit entries on FIFO basis for each customer to calculate Payment Relization on script level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trnTabale:&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="148" style="width: 488px; border: 1px solid #000000; height: 143px;" width="495"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;rowId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt; trnNo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnDate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;custId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnTy﻿pe&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnAmount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnAmt &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnDrAmt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;trnCrAmt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;BNK-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;01/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Cr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;50000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;50000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;50000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;BNK-2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Cr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;06/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;07/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;BNK-3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;Cr&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ResultTable:&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="85" style="width: 349px; border: 1px solid #000000; height: 67px;" width="347"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;custId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt; Inv. No.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdAmt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdOn&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;07/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;10000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;06/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks In Advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IndianQvLover&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 12:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411319#M153137</guid>
      <dc:creator />
      <dc:date>2012-10-13T12:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411320#M153138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain in more detail what you want? How are amount and recdamt calculated?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 16:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411320#M153138</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-13T16:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411321#M153139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Gysbert sure,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for 10 mins late.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each line in result table is derived from trnTable where trnType=Dr, means each Debit entries of each customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Amount = trnAmount only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.RecdAmt : Shows Amount knock off / received against a particular invoice on FIFO basis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For INV-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Ist&amp;nbsp;&amp;nbsp; BNK-1 will knock off against INV-1 with full 50000 and RecdOn is trnDate= 01/05/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. IInd&amp;nbsp; BNK-2 will knock off against INV-1 with full 15000 and RecdOn is trnDate=05/05/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c. IIIrd&amp;nbsp; BNK-3 will knock off against INV-1 with partial 5000 only and RecdOn is trnDate=08/05/2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; remaining 10000 of BNK-3 will be knock off in next invoice&lt;/P&gt;&lt;P&gt;For INV-2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Remaining 10000 of BNK will be knock off and RecdOn is 08/05/2011&lt;/P&gt;&lt;P&gt;For INV-3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No Credit entry found of custID : a2 thats why RecdAmt is 0 and RecdOn if null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basicaly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;RecdAmt = sum of all knock off amount against a particular Debit entry &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;RecdOn = replacing with trnDate every time when knock off take place&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;intermediateResultTable:&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="139" style="background-color: rgb(255, 255, 255); border: 1px solid rgb(0, 0, 0); margin: 1px 0px; padding: 3px; color: rgb(115, 115, 115); font-family: Arial; width: 351px; height: 134px;"&gt;&lt;TBODY&gt;&lt;TR style="border: 0px;"&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;custId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Inv. No.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdAmt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdOn&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;50000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;01/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;5000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid rgb(0, 0, 0); margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;07/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;10000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;06/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this intermediateResultTable FinalResult Table will derived&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;ResultTable:&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="93" style="background-color: #ffffff; border: 1px solid #000000; margin: 1px 0px; padding: 3px; color: #737373; font-family: Arial; width: 344px; height: 96px;" width="336"&gt;&lt;TBODY&gt;&lt;TR style="border: 0px;"&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;custId&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Inv. No.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdAmt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="border: 1px solid #000000; background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;RecdOn&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;05/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;70000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;07/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;25000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;10000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;08/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px;"&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;a2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;INV-2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;06/05/2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;40000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; margin: 1px; padding: 3px; text-align: center;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I explain properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IndianQvLover&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 17:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411321#M153139</guid>
      <dc:creator />
      <dc:date>2012-10-13T17:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411322#M153140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks and will wait for solution from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IndianQvLover&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 19:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411322#M153140</guid>
      <dc:creator />
      <dc:date>2012-10-13T19:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411323#M153141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is I am asking somthing wrong, Please tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 07:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411323#M153141</guid>
      <dc:creator />
      <dc:date>2012-10-14T07:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411324#M153142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it's clear what you require&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is an interesting (and it seems to me quite difficult) challenge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Im unsure how to do it though. Hopefully a QV expert can solve this as it would interest me how to do this (if it can be done)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 10:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411324#M153142</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-10-14T10:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411325#M153143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my part (not complete) attempt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (It will need more work though as only one customer has paid but this might help you)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort excel by CustID then trnNo then rowID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or use load order by)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2 load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD rowId, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnNo, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; custId, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnTy﻿pe, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmount, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmt, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDrAmt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numsum (trnAmt,peek('Amt')) as Amt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnCrAmt&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;D:\QlikView2\TestSerialRH.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is QVFORUM);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 3 load three dimensions &lt;/P&gt;&lt;P&gt;(Rename trnNo to Inv Num etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;custId&lt;/P&gt;&lt;P&gt;trnNo&lt;/P&gt;&lt;P&gt;trnDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 4 add 2 expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amount expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;trnNo = {'*INV*' }&amp;nbsp; &amp;gt;}trnAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RecdAmount expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(sum (Amt)&amp;gt;0,&lt;/P&gt;&lt;P&gt;sum({&amp;lt;trnNo = {'*INV*' }&amp;nbsp; &amp;gt;}trnAmount),&lt;/P&gt;&lt;P&gt;if(sum({&amp;lt;trnNo = {'*INV*' }&amp;nbsp; &amp;gt;}trnAmount)&lt;/P&gt;&lt;P&gt;&amp;gt;-sum (Amt),&lt;/P&gt;&lt;P&gt;sum (Amt)+sum({&amp;lt;trnNo = {'*INV*' }&amp;nbsp; &amp;gt;}trnAmount),&lt;/P&gt;&lt;P&gt;0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB The last payment date I will let you work out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 11:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411325#M153143</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-10-14T11:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411326#M153144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi IndianQvLover,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since Last day I am working on your query and trying to provide a batter solution. But as you explain, as I understand. As per my experience I can say that you have adopt the &lt;STRONG&gt;&lt;EM&gt;structural programming &lt;/EM&gt;&lt;/STRONG&gt;approach in this with a lot of &lt;STRONG&gt;&lt;EM&gt;if then else endif &lt;/EM&gt;&lt;/STRONG&gt;block and &lt;EM&gt;&lt;STRONG&gt;loops&lt;/STRONG&gt;&lt;/EM&gt; and a lot of programming &lt;STRONG&gt;&lt;EM&gt;gimmicks&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically there is no direct way to solve this type of queries in t-Sql / pl-Sql too. To solve this type of queries in t-Sql / pl-Sql I am using cursors. SQL or RDBMS masters suggest minimum use or not to be use of cursor due to performance issues. I think same here in QlikView too there may be a performance issue with a large data set when using &lt;EM&gt;&lt;STRONG&gt;structural programming &lt;/STRONG&gt;&lt;/EM&gt;approach. It is not necessary that others are agree with me. But In may opinion there is no other way and I am working on the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Mr. RJ says that "There is some other ways to solve it" I am sure that any one of QlikView master / champ will give you good solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hopefully tomorrow I will give you my solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 12:10:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411326#M153144</guid>
      <dc:creator />
      <dc:date>2012-10-14T12:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411327#M153145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;hi &lt;SPAN&gt;IndianQvLover&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check attached QVW file. Solution to your query is based on &lt;STRONG&gt;&lt;EM&gt;structural programming&lt;/EM&gt;&lt;/STRONG&gt; approach. I could not found other better way may others have.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I am not satisfied with this salutation because it will reduce the performance due to havey use of if then else block. I will try to suggestion on this from Mr.&lt;SPAN&gt;Swuehl&lt;/SPAN&gt;, Mr. John &lt;SPAN&gt;Witherspoon&lt;/SPAN&gt;, Mr. Miguel Angel, Mr. Rob and others&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But at this it is only I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&lt;SPAN&gt;Anil&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;================================================ Script&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//---------------------------------------- Transactional Data&lt;/P&gt;&lt;P&gt;trnTab:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;rowId, trnNo, trnDate, custId, trnTy﻿pe, trnAmount, trnAmt, trnDrAmt, trnCrAmt&lt;/P&gt;&lt;P&gt;1, BNK-1, 01/05/2011, a1, Cr, 50000, 50000, 0, 50000&lt;/P&gt;&lt;P&gt;2, INV-1, 05/05/2011, a1, Dr, 70000,-70000,70000, 0&lt;/P&gt;&lt;P&gt;3, BNK-2, 05/05/2011, a1, Cr, 15000, 15000,0, 15000&lt;/P&gt;&lt;P&gt;4, INV-2, 06/05/2011, a2, Dr, 40000,-40000,40000, 0&lt;/P&gt;&lt;P&gt;5, INV-3, 07/05/2011, a1, Dr, 2000, -2000,2000,0&lt;/P&gt;&lt;P&gt;6, INV-4, 08/05/2011, a1, Dr, 25000,-25000,25000, 0&lt;/P&gt;&lt;P&gt;7, BNK-3, 09/05/2011, a1, Cr, 15000, 15000,0, 15000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//---------------------------------------- Debit Data to be knock off &lt;/P&gt;&lt;P&gt;//--- Load all Debit Transaction i.e. Invoice Details in a separate Table &lt;/P&gt;&lt;P&gt;drTab:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp; custId as drCustId,&lt;/P&gt;&lt;P&gt;&amp;nbsp; trnNo as invNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp; trnDate as invDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; trnAmount as Amount&lt;/P&gt;&lt;P&gt;Resident trnTab where trnTy﻿pe='Dr' order by custId,trnDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;------------------------------------------ Data Transformation &lt;/P&gt;&lt;P&gt;Logic Of Data Transformation : This solution is based on structural programming gimmicks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Load all Debit Transaction i.e. Invoice Details in a separate Table say drTab&lt;/P&gt;&lt;P&gt;2. Declare some variabale / flage and set there values to 0&lt;/P&gt;&lt;P&gt;2. Start a infinity loop and With in this loop &lt;/P&gt;&lt;P&gt;3. Read first row data from Debit Trn. Table and set vDrFlg variable value to 1&lt;/P&gt;&lt;P&gt;4. Extrect all Credit records in a separate table say crTab for just previously read custId and set vCrFlg=0&lt;/P&gt;&lt;P&gt;5. Read First entry from Credit records table&lt;/P&gt;&lt;P&gt;6. Knock off Debit previously read debit record with credit record and insert each knocked off record in Intermediate result table&lt;/P&gt;&lt;P&gt;7. After each insert, check whether debit entry fully knock off or not then again if not then then repeate steps 5,6,7&lt;/P&gt;&lt;P&gt;8. if yes then repeate steps from step no 3 but for next row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : With in infinity loop flow is controled by if then else blocks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For me it not possible to wright each and every steps of logic here any one has to understand it.&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;let vCounter=1;let vDrFlg=0;let vDrRow=0;let vCrFlg=0;let vCrCustId='';vCrRow=0;let vDrRecords=NoOfRows('drTab')-1;&lt;/P&gt;&lt;P&gt;do while vCounter=1 //--- Infinity loop&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vDrFlg=0 then //--- Protecting from every time read from debit trn. table till entry is fully knock off&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrFlg=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrAmt=peek('Amount',vDrRow,'drTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrCustId=peek('drCustId',vDrRow,'drTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrInvNo=peek('invNo',vDrRow,'drTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrInvDat=peek('invDate',vDrRow,'drTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vCrCustId&amp;lt;&amp;gt;vDrCustId then; vCrCustId=''; endif&amp;nbsp;&amp;nbsp; //--- seting custId &lt;/P&gt;&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vCrCustId&amp;lt;&amp;gt;vDrCustId then //--- Debit custId changed then drop credit trn table and load credit trn records in credit trn table&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrFlg=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrCustId=vDrCustId&lt;/P&gt;&lt;P&gt;&amp;nbsp; vBalAmt=vDrAmt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if NoOfRows('crTab')&amp;gt;0 then; DROP Table crTab; endif;&lt;/P&gt;&lt;P&gt;&amp;nbsp; crTab:&lt;/P&gt;&lt;P&gt;&amp;nbsp; load trnDate as docDate, trnAmount as crAmt Resident trnTab where trnTy﻿pe='Cr' and custId = '$(vDrCustId)' order by custId,trnDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vCrRecords=NoOfRows('crTab') -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vCrFlg=0 then //--- Protecting from every time read from credit trn. table &lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrAmt=peek('crAmt',vCrRow,'crTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrDate=peek('docDate',vCrRow,'crTab')&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrFlg=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrAmt=fabs(vBalAmt)&lt;/P&gt;&lt;P&gt;&amp;nbsp; vBalAmt=vDrAmt&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; vBalAmt=vBalAmt-vCrAmt&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrAmt=if(vBalAmt&amp;gt;0,vCrAmt,(vCrAmt+vBalAmt));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; intTab: //--- Inserting records in to intermedieate result table&lt;/P&gt;&lt;P&gt;&amp;nbsp; load * inline [&lt;/P&gt;&lt;P&gt;&amp;nbsp; iCustId, iInvNo, iInvDate, iAmount, iCrAmt, iCrDate&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vDrCustId), $(vDrInvNo), $(vDrInvDat), $(vDrAmt), $(vCrAmt), $(vCrDate)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vBalAmt&amp;lt;0 then //--- Checking whether debit fully knock off or not 0:- fully knocked off&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrRow=vDrRow+1&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrFlg=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; else //--- When debit entry partially knock off&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vCrRow&amp;gt;=vCrRecords then //--- Checking Credit trn. table row counter&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrRow=vDrRow+1&lt;/P&gt;&lt;P&gt;&amp;nbsp; vDrFlg=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrRow=vCrRow+1&lt;/P&gt;&lt;P&gt;&amp;nbsp; vCrFlg=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;&lt;P&gt;&amp;nbsp; if vDrRow &amp;gt; vDrRecords then; vCounter=2; endif //--- Checking Infinity loop row counter&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//---------------------------------------------------- Final Result Table&lt;/P&gt;&lt;P&gt;finalResultTab:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp; iCustId as rCustId,&lt;/P&gt;&lt;P&gt;&amp;nbsp; iInvNo as rInvNo,&lt;/P&gt;&lt;P&gt;&amp;nbsp; iInvDate as rInvDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; iAmount as rAmount,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(iCrAmt) as rRecdAmt,&lt;/P&gt;&lt;P&gt;&amp;nbsp; max(iCrDate) as rRecdOn&lt;/P&gt;&lt;P&gt;Resident intTab group by iCustId, iInvNo, iInvDate, iAmount;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 13:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411327#M153145</guid>
      <dc:creator />
      <dc:date>2012-10-15T13:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411328#M153146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Anil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check it and found its working fine, it is the same as I need. I will try it with large data set and will tell you about your doubt. But at this time this solution is Grrrrrrrrrrrr88888888888.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Buddy, Superb and looks perfect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IndianQvLover&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 14:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411328#M153146</guid>
      <dc:creator />
      <dc:date>2012-10-15T14:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411329#M153147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried another approach based on the manual &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;24.4 Usng the extended inteRval match syntax to resolve slowly changing dimension problems&lt;/P&gt;&lt;P&gt;Where invoices are loaded and then receipts amd then interval match is used to match receipts with invoices&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and on this &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/thread/17759" title="http://community.qlik.com/thread/17759"&gt;http://community.qlik.com/thread/17759&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have changed your figures slightly to see if it work for more than one paying customer &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully it works for larger quantities&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" src="https://community.qlik.com/message/272205/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="778"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="72" width="60"&gt;custId&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="92"&gt;Inv Num&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="123"&gt;Inv Date&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="81"&gt;SumInv&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="69"&gt;Paid&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="126"&gt;FIFO fully Paid Date&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="72"&gt;TN2&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="90"&gt;Total Invoiced&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="65"&gt;TotalPaid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="24" style="border-top: none;"&gt;a1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;INV-1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;05/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;45000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;45000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;05/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;BNK-2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;92000&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;91000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="24" style="border-top: none;"&gt;a1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;INV-3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;07/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;12000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;12000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;09/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;BNK-3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;92000&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;91000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="24" style="border-top: none;"&gt;a1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;INV-4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;08/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;35000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;34000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;92000&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;91000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="24" style="border-top: none;"&gt;a2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;INV-2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;06/05/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;40000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;40000&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;20/06/2011&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;BNK-5&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;40000&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;52000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;IMG class="jiveImage" src="https://community.qlik.com/message/272205/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 03:36:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411329#M153147</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-10-21T03:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411330#M153148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='£#,##0.00;-£#,##0.00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='hh:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD/MM/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;set NullInterpret = '';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rowId, trnNo, trnDate, custId, trnTy﻿pe, trnAmount, trnAmt, trnDrAmt, trnCrAmt&lt;/P&gt;&lt;P&gt;1, BNK-1, 01/05/2011, a1, Cr, 31000, 31000, 0, 31000&lt;/P&gt;&lt;P&gt;2, INV-1, 05/05/2011, a1, Dr, 45000,-45000,45000, 0&lt;/P&gt;&lt;P&gt;3, BNK-2, 05/05/2011, a1, Cr, 15000, 15000,0, 15000&lt;/P&gt;&lt;P&gt;4, INV-2, 06/05/2011, a2, Dr, 40000,-40000,40000, 0&lt;/P&gt;&lt;P&gt;5, INV-3, 07/05/2011, a1, Dr, 12000, -12000,12000,0&lt;/P&gt;&lt;P&gt;6, INV-4, 08/05/2011, a1, Dr, 35000,-35000,35000, 0&lt;/P&gt;&lt;P&gt;7, BNK-3, 09/05/2011, a1, Cr, 45000, 45000,0, 45000&lt;/P&gt;&lt;P&gt;8, BNK-4, 20/05/2011, a2, Cr, 20000, 20000,0, 20000&lt;/P&gt;&lt;P&gt;9, BNK-5, 20/06/2011, a2, Cr, 21000, 21000,0, 21000&lt;/P&gt;&lt;P&gt;10, BNK-6, 28/06/2011, a2, Cr, 11000, 11000,0, 11000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&amp;nbsp; load invoices&lt;/P&gt;&lt;P&gt;DataInv:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnNo, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; custId, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnTy﻿pe, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmount, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmt, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDrAmt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(PREVIOUS(custId)=custId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEEK('AccInv'),0)+trnAmount AS AccInv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnCrAmt&lt;/P&gt;&lt;P&gt;resident Data &lt;/P&gt;&lt;P&gt;where trnTy﻿pe = 'Dr'&lt;/P&gt;&lt;P&gt;order by trnTy﻿pe,custId,trnNo,rowId&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load receipts NB all these fields are not needed&lt;/P&gt;&lt;P&gt;NULLASVALUE AccumPaid,AccumPaidOpen;&lt;/P&gt;&lt;P&gt;DataPaid:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;rowId as RID2,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnNo as TN2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDate as PaidDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; custId , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnTy﻿pe AS TT2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmount AS PaidAmt2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnAmt as TA3, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnDrAmt AS&amp;nbsp; TDR2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(PREVIOUS(custId)=custId,PEEK('AccumPaid'),0)+trnAmt AS AccumPaid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trnCrAmt AS trct2&lt;/P&gt;&lt;P&gt;resident Data &lt;/P&gt;&lt;P&gt;where trnTy﻿pe = 'Cr'&lt;/P&gt;&lt;P&gt;order by trnTy﻿pe,custId,trnNo,trnDate&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// TO CALCULATE THE RANGE TO DO THE INTERVAL MATCH&lt;/P&gt;&lt;P&gt;DataPaidAdd:&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;RID2,&lt;/P&gt;&lt;P&gt;IF(PREVIOUS(custId)=custId,Previous (AccumPaid)+.01,0.1) AS AccumPaidOpen&lt;/P&gt;&lt;P&gt;resident DataPaid;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// TO CALCULATE THE TOTAL PAID BY CUSTOMER&lt;/P&gt;&lt;P&gt;PaidTotal:&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;custId,&lt;/P&gt;&lt;P&gt;Sum (PaidAmt2) as TotalPaid&lt;/P&gt;&lt;P&gt;resident DataPaid&lt;/P&gt;&lt;P&gt;group by custId;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// TO MATCH RECEIPTS TO INVOICES BY CUSTOMER&lt;/P&gt;&lt;P&gt;Join:&lt;/P&gt;&lt;P&gt;inner join&lt;/P&gt;&lt;P&gt;intervalmatch (AccInv,custId)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;AccumPaidOpen,&lt;/P&gt;&lt;P&gt;AccumPaid,&lt;/P&gt;&lt;P&gt;custId&lt;/P&gt;&lt;P&gt;RESIDENT DataPaid;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load three dimensions &lt;/P&gt;&lt;P&gt;(Rename trnNo to Inv Num etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;custId&lt;/P&gt;&lt;P&gt;trnNo&lt;/P&gt;&lt;P&gt;trnDate&lt;/P&gt;&lt;P&gt;Paid date &lt;/P&gt;&lt;P&gt;TN2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPRESSIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(trnAmount)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //sum invooice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// PAID BY INVOICE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(AccumPaid &amp;gt;0,SUM(trnAmount),&lt;/P&gt;&lt;P&gt;sum(trnAmount)&lt;/P&gt;&lt;P&gt;+aggr (sum({1}total&amp;lt;custId&amp;gt;TotalPaid),custId,trnNo)&lt;/P&gt;&lt;P&gt;/aggr (count({1} total&amp;lt;custId&amp;gt; TN2),custId,trnNo)&lt;/P&gt;&lt;P&gt;-aggr (SUM({1} total&amp;lt;custId&amp;gt; &lt;/P&gt;&lt;P&gt;trnAmount),custId,trnNo))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//TOTAL INVOICED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr (SUM({1} total&amp;lt;custId&amp;gt; &lt;/P&gt;&lt;P&gt;trnAmount),custId,trnNo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//TOTAL PAID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr (sum({1}total&amp;lt;custId&amp;gt;TotalPaid),custId,trnNo)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;aggr (count({1} total&amp;lt;custId&amp;gt; &lt;/P&gt;&lt;P&gt;TN2),custId,trnNo)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 03:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411330#M153148</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-10-21T03:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411331#M153149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi RJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am checking your approach then will reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 08:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411331#M153149</guid>
      <dc:creator />
      <dc:date>2012-10-21T08:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411332#M153150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or issues will be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just used the sample script in the manual but used a value range rather than a date range. So I'm not sure if all the options I have included (like set nullinterpret) are necessary or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm still learning QV so this was a great exercise for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It involved&lt;/P&gt;&lt;P&gt;-Accumulation by cust / amount in the script (I had almost given up but solution thanks to the above forum solution)&lt;/P&gt;&lt;P&gt;-Sum group (script)&lt;/P&gt;&lt;P&gt;-Understanding extended interval match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see a problem with drill down by date or invoice (custId is fine). But this could be likely overcome with say aggr and set analysis. But I will work on this next weekend if I have time. (NOW ADJUSTED)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change the total paid (and else section of paid by invoice) to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr (sum({1}total&amp;lt;custId&amp;gt;TotalPaid),custId,trnNo)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;aggr (count({1} total&amp;lt;custId&amp;gt; &lt;/P&gt;&lt;P&gt;TN2),custId,trnNo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 10:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/411332#M153150</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-10-21T10:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed On : knock off Debit With Credit on Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/1525061#M438336</link>
      <description>&lt;P&gt;Hi Sir&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you Please help me to make a automated excel sheet to calculate interest on payment after due date.&lt;/P&gt;&lt;P&gt;i mean invoice must be knocked off on FIFO basis and payment may not be bill to bill.I am uploading a file in which manual calculation of interest is done .can you please help me to get it automated.Customer ledger is also attached .please mail me to&lt;/P&gt;&lt;P&gt;ymoneymantra@gmail.com if you find any solution.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 09:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Needed-On-knock-off-Debit-With-Credit-on-Script/m-p/1525061#M438336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-31T09:38:17Z</dc:date>
    </item>
  </channel>
</rss>

