<?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: Use previous row as current row calculation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333045#M101869</link>
    <description>Take a look at tMemorizeRows component, this component can fit your need.&amp;nbsp;</description>
    <pubDate>Thu, 25 Feb 2016 08:57:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-02-25T08:57:59Z</dc:date>
    <item>
      <title>Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333038#M101862</link>
      <description>&lt;P&gt;hi all,&lt;BR /&gt;i just wonder how talend can get previous row value to be used in current row mathematical calculation. Example:&lt;BR /&gt;&lt;BR /&gt;A &amp;nbsp; &amp;nbsp;X1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y1 = (Y0-X1)*A&lt;BR /&gt;----------------------------------------&lt;BR /&gt;-- &amp;nbsp; -- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(0 - 5)*1 = -5&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(-5-3)*2 = -16&lt;BR /&gt;3 &amp;nbsp; &amp;nbsp;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(-16-6)*3 = -66&lt;BR /&gt;4 &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(-66-2)*4 = -272&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How do i can calculate formula Y1 as above.&lt;BR /&gt;&lt;BR /&gt;i really appreciate your help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 14:52:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333038#M101862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-21T14:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333039#M101863</link>
      <description>Hi all, 
&lt;BR /&gt;Plz help me 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Sun, 24 Jan 2016 02:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333039#M101863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-24T02:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333040#M101864</link>
      <description>Hi&lt;BR /&gt;You can store the calculation result to a global variable on tJavaRow for used later. eg:&lt;BR /&gt;...tMap--main--tJavaRow&lt;BR /&gt;&lt;BR /&gt;Doing the calculation on tMap:&lt;BR /&gt;(Integer)globalMap.get("result")==null?(0-row1.X1)*row1.A: ((Integer)globalMap.get("result")--row1.X1)*row1.A&lt;BR /&gt;&lt;BR /&gt;on tJavaRow:&lt;BR /&gt;globalMap.put("result", input_row.Y1);</description>
      <pubDate>Sun, 24 Jan 2016 03:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333040#M101864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-24T03:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333041#M101865</link>
      <description>Hi shong, 
&lt;BR /&gt; 
&lt;BR /&gt;I have tried the solution above, but its still not working. 
&lt;BR /&gt;My condition is (Double)globalMap.get("result") == null ? 100.0 : (Double)globalMap.get("result") + 1 &amp;nbsp; 
&lt;BR /&gt;But the result return as picture below. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH5O.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134396iDEC0988FB73C3BA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH5O.png" alt="0683p000009MH5O.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 25 Feb 2016 04:41:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333041#M101865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T04:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333042#M101866</link>
      <description>I see you use another expression to calculate the data, what's your input data? What are your expected result?&amp;nbsp;</description>
      <pubDate>Thu, 25 Feb 2016 06:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333042#M101866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T06:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333043#M101867</link>
      <description>I can see an example here .Let us know if it helps :
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://talendtutorials.wordpress.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://talendtutorials.wordpress.com/&lt;/A&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:09:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333043#M101867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T07:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333044#M101868</link>
      <description>Example:&lt;BR /&gt;&lt;BR /&gt;Ty &amp;nbsp;Survival_Ft&lt;BR /&gt;--- &amp;nbsp;-------------&lt;BR /&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 100 + 1 = 101&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; 101 + 1 = 102&lt;BR /&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; 102 + 1 = 103&lt;BR /&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; 103 + 1 = 104&lt;BR /&gt;&lt;BR /&gt;I want to use the previous row answer to calculate for the next row.&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 25 Feb 2016 08:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333044#M101868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T08:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous row as current row calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333045#M101869</link>
      <description>Take a look at tMemorizeRows component, this component can fit your need.&amp;nbsp;</description>
      <pubDate>Thu, 25 Feb 2016 08:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Use-previous-row-as-current-row-calculation/m-p/2333045#M101869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T08:57:59Z</dc:date>
    </item>
  </channel>
</rss>

