<?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: Need help in Qlikview scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174884#M381481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry its a Typo. It should be 1000. I have posted another in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jul 2016 05:34:42 GMT</pubDate>
    <dc:creator>pavandbs</dc:creator>
    <dc:date>2016-07-20T05:34:42Z</dc:date>
    <item>
      <title>Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174877#M381474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am brainstorming to get the desired output for the below requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 514px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" width="111"&gt;Transaction Date&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="64"&gt;Deal&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="85"&gt;Prev_Deal&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="100"&gt;Sales Margin&lt;/TD&gt;&lt;TD class="xl70" style="border-left: none;" width="90"&gt;Derived Field&lt;/TD&gt;&lt;TD class="xl71" width="64"&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl72" height="20"&gt;30-Jul-16&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;12345&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;"&gt;Dead&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;1-Aug-16&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;67890&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;12345&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dead&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;2-Aug-16&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;67891&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;67890&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3000&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dead&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;3-Aug-16&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;67892&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;67891&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4000&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dead&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1-Sep-16&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;67889&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;67892&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7000&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2000&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;Live&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the derived field based on Month&lt;/P&gt;&lt;P&gt;1. As of 30-Jul-2016 Transaction date I have reported 1000 Sales Margin. (As of 30-Jul-2016 Status is also only)&lt;/P&gt;&lt;P&gt;2. On 1-Aug-2016 67890 is inserted, deal 12345 is parent. Since for Jul I have reported 1000 for Aug I have to report 2000-10000=1000 is my derived field. For deal 67891,same as 67890. At the end of Aug I have reported 4000&lt;/P&gt;&lt;P&gt;3. On 01-Sep-16 since I have reported 4000, now I should report 7000-4000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice how I derive the logic. All the Deal and Prev_Deal are interlinked and are in one package.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 08:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174877#M381474</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2016-07-18T08:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174878#M381475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't really understand what do you want to do but if you need to match respectively to calculate something depending on other records you could do it with: &lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 10:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174878#M381475</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-07-18T10:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174879#M381476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as Marcus mentioned the expected result is a bit unclear. Can you please elaborate on what you expect the result to be on each row in you example table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you attach a sample QVW file with the sample data loaded and a table object prepared for the aggregation, I also think you might get more precise answers to your inquiry. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 23:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174879#M381476</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-07-18T23:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174880#M381477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Toni &amp;amp; Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Column derived is my expected result column. Scenario is bit complex but I will try by best to explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1. &lt;SPAN style="font-size: 13.3333px;"&gt;Basically end users are Sales Traders. &lt;/SPAN&gt;Traders will book a deal lets say ForEx, for any adjustments they may cancel existing deal and re issue for the same package. Sales margin numbers are reporting by month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2. Deal and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;prev_deal&lt;/SPAN&gt; are inter connected. Column Deal is Parent, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;prev_deal&lt;/SPAN&gt; is Child. If Prev Deal is 0 means, that is the first one to insert.&lt;/P&gt;&lt;P&gt;3. Example, as of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;30-Jul-16, Deal &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;12345 is Live. I will be reporting original sales Margin amount &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1000 as my Derived field. Deal &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;12345 is a new deal as of&amp;nbsp; 30-Jul-2016, prev_deal is zero&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;4. As of 01-Aug-2016, deal 12345 has been cancelled (Means deal &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;12345&lt;/SPAN&gt; is dead) and new deal has been reissued &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67890. Means as of 01-Aug-2016 deal 67890 is live. Deal 12345 is parent deal for&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67890. My logic for derived column is, since I have already reported for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1000 for previous month I should subtract previous month report number. i.e Sales Margin 2000(Reissued deal Sales Margin)-1000 (previous month reported sales Margin)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;5. Same logic for remaining deals &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67891, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67892. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67891 is re issued deal of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67890. Derived column should be &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;4000(newly reissued deal)-1000 (last month reported sales margin). Same logic applies for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67892.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;6. At the end of the month I will be reporting &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67892, because this deal would be live as of Aug-2016 and I will be reporting 5000-1000=4000&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;7. On the 01-Sep-2016 deal &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67892 is Cancelled and Reissued to new deal &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;67889. Since Sales Margin is already reported for Aug, I need to take 67892 reported sales Margin 4000 and subtract from new sales margin for September. My derived column for 01-Sep-2016 deal is 7000-4000=3000 (Apologies I have given wrong calculation for Sep in my table ) .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Pavan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 02:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174880#M381477</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2016-07-19T02:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174881#M381478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am confused . Here I have one Doubt&amp;nbsp; how you get &lt;STRONG style="color: #0000ff;"&gt;10000&amp;nbsp; you don't have this much amount in your data any where.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;check in your mentioned Second point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Since for Jul I have reported 1000 for Aug I have to report 2000-10000=1000 is my derived field&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 05:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174881#M381478</guid>
      <dc:creator>qlikview979</dc:creator>
      <dc:date>2016-07-19T05:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174882#M381479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;LOAD *,date(Date#(TransactionDate)) as TransactionDate1&amp;nbsp; INLINE [&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TransactionDate,Deal,Prev_Deal, SalesMargin,MonthDay,Month&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30-Jul-16, 12345, 0, 1000 , 0730,07&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01-Aug-16, 67890, 12345, 2000,0801,08&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-Aug-16, 67891, 67890, 4000,0802,08&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03-Aug-16, 67892, 67891, 5000,0803,08&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01-Sep-16, 67889, 67892, 7000,0901,09&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;load *,&lt;BR /&gt;SalesMargin-Derived as NewDerived ;&lt;BR /&gt;load &lt;BR /&gt; *,&lt;BR /&gt;if( trim(Month)&amp;lt;&amp;gt;trim(Peek(Month)) ,numsum(fabs(Peek(SalesMargin)),0), peek(Derived)) as Derived,&lt;BR /&gt; if( trim(Month)&amp;lt;&amp;gt;trim(Peek(Month)),1, 2) as Derived1,&lt;BR /&gt;&amp;nbsp; TextBetween(TransactionDate,'-','-') as month&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; Resident A &lt;BR /&gt; Order by MonthDay;&lt;BR /&gt; &lt;BR /&gt; DROP Table A;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/131732_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 05:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174882#M381479</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2016-07-19T05:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174883#M381480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be you are expecting similar to this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to post application with Expected O/P Then you will get proper information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 07:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174883#M381480</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-07-19T07:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174884#M381481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry its a Typo. It should be 1000. I have posted another in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 05:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174884#M381481</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2016-07-20T05:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174885#M381482</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 Toni,&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;Thanks for your response.&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;The Column derived is my expected result column. Scenario is bit complex but I will try by best to explain&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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;1. &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Basically end users are Sales Traders. &lt;/SPAN&gt;Traders will book a deal lets say ForEx, for any adjustments they may cancel existing deal and re issue for the same package. Sales margin numbers are reporting by month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2. Deal and &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;prev_deal&lt;/SPAN&gt; are inter connected. Column Deal is Parent, &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;prev_deal&lt;/SPAN&gt; is Child. If Prev Deal is 0 means, that is the first one to insert.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;3. Example, as of &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;30-Jul-16, Deal &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;12345 is Live. I will be reporting original sales Margin amount &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;1000 as my Derived field. Deal &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;12345 is a new deal as of&amp;nbsp; 30-Jul-2016, prev_deal is zero&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&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="font-weight: inherit; font-style: inherit;"&gt;4. As of 01-Aug-2016, deal 12345 has been cancelled (Means deal &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;12345&lt;/SPAN&gt; is dead) and new deal has been reissued &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67890. Means as of 01-Aug-2016 deal 67890 is live. Deal 12345 is parent deal for&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67890. My logic for derived column is, since I have already reported for &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;1000 for previous month I should subtract previous month report number. i.e Sales Margin 2000(Reissued deal Sales Margin)-1000 (previous month reported sales Margin)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&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="font-weight: inherit; font-style: inherit;"&gt;5. Same logic for remaining deals &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67891, &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67892. &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67891 is re issued deal of &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67890. Derived column should be &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;4000(newly reissued deal)-1000 (last month reported sales margin). Same logic applies for &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67892.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&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="font-weight: inherit; font-style: inherit;"&gt;6. At the end of the month I will be reporting &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67892, because this deal would be live as of Aug-2016 and I will be reporting 5000-1000=4000&lt;/SPAN&gt;&lt;/SPAN&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="font-weight: inherit; font-style: inherit;"&gt;7. On the 01-Sep-2016 deal &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67892 is Cancelled and Reissued to new deal &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;67889. Since Sales Margin is already reported for Aug, I need to take 67892 reported sales Margin 4000 and subtract from new sales margin for September. My derived column for 01-Sep-2016 deal is 7000-4000=3000 (Apologies I have given wrong calculation for Sep in my table ) .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 08:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174885#M381482</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2016-07-20T08:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174886#M381483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please send that Applicaton, Might be he is looking same thing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 08:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174886#M381483</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-07-20T08:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174887#M381484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from my understanding there is not a one-step way to accomplish your requirement in the load script. I would suggest looking at flagging the data so that you can aggregate the number over each deal path and per month within the deal path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached example I have used the Hierarchy load prefix to group the deals over the first deal in the chain of deals. The date value then needs to be reformatted to a month to allow the second level of grouping. In this example I used Month Start to find what month each date belongs to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With these two grouping you will have to find a way to aggregate the derived value as you expect. I am not sure exactly what the best approach for the aggregation would be. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:10:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174887#M381484</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-07-22T05:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174888#M381485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Toni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for quick turn around. Logic looks good, however when I reload Derive column is disappearing. Did I miss some thing ? I mean in script the couldn't see Derive column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 05:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174888#M381485</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2016-07-22T05:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Qlikview scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174889#M381486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry, I accidentally left the derive field in the sample, after trying to find a quick way to add it. As I mentioned above I am not able to find a simple solution to your required logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main complexity I struggled with is that you need to aggregate per month within one deal path, and then carry over result&amp;nbsp; to next month. I did not find a simple way to do that. My assumption is that you might need to flag the aggregated intervals and then aggregate the intervals. I think you mentioned trying to do this thought FOR loops or similar, have you tried that approach?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jul 2016 23:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-Qlikview-scripting/m-p/1174889#M381486</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-07-31T23:47:42Z</dc:date>
    </item>
  </channel>
</rss>

