<?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: Remember value from previous row? in Installing and Upgrading</title>
    <link>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395624#M8146</link>
    <description>Hi,&lt;BR /&gt;Thanks for the solotion. I did some minor changes and now it works. I changed the #start part into&lt;BR /&gt;&lt;PRE&gt;my $oldComponentColumnValue='';&lt;BR /&gt;my $componentColumnValue='99991231';&lt;/PRE&gt;&lt;BR /&gt;and added a filter in the tMap becourse it gives 1 extra row with only the previous date.</description>
    <pubDate>Fri, 05 Jan 2007 10:53:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-01-05T10:53:24Z</dc:date>
    <item>
      <title>Remember value from previous row?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395623#M8145</link>
      <description>Hi,
&lt;BR /&gt;is it possible to remember a value from the previous row? I have a time period where I inserted a new value and need the value from the previous (or next depending on the sorting) row.
&lt;BR /&gt;
&lt;PRE&gt;id beg_date end_date info&lt;BR /&gt;--+--------+--------+----&lt;BR /&gt; 1 20060101 99991231 abcd&lt;BR /&gt;now I insert the changed info for id 1&lt;BR /&gt;id beg_date end_date info&lt;BR /&gt;--+--------+--------+----&lt;BR /&gt; 1 20070101 99991231 xyz&lt;BR /&gt; 1 20060101 99991231 abcd&lt;BR /&gt;Then I want to enddate the previous entry with the beg_date of the new entry&lt;BR /&gt;id beg_date end_date info&lt;BR /&gt;--+--------+--------+----&lt;BR /&gt; 1 20070101 99991231 xyz&lt;BR /&gt; 1 20060101 20070101 abcd&lt;/PRE&gt;
&lt;BR /&gt;Can sombody tel me how to preserve the previous value in Talend?</description>
      <pubDate>Sat, 16 Nov 2024 14:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395623#M8145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Remember value from previous row?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395624#M8146</link>
      <description>Hi,&lt;BR /&gt;Thanks for the solotion. I did some minor changes and now it works. I changed the #start part into&lt;BR /&gt;&lt;PRE&gt;my $oldComponentColumnValue='';&lt;BR /&gt;my $componentColumnValue='99991231';&lt;/PRE&gt;&lt;BR /&gt;and added a filter in the tMap becourse it gives 1 extra row with only the previous date.</description>
      <pubDate>Fri, 05 Jan 2007 10:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395624#M8146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-05T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remember value from previous row?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395625#M8147</link>
      <description>Ok that's great.&lt;BR /&gt;Just a litte point, with your filter in the tMap, if you want the last beg_date, you have to make the same test in the loop of the tPerlFlex.&lt;BR /&gt;&lt;PRE&gt;if (tPerlFlex_1 ne '') {&lt;BR /&gt;   $oldComponentColumnValue = $componentColumnValue;&lt;BR /&gt;   $componentColumnValue = $tPerlFlex_1;&lt;BR /&gt;}&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jan 2007 11:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395625#M8147</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-05T11:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remember value from previous row?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395626#M8148</link>
      <description>Hi,&lt;BR /&gt;Thanks for the hint on the condition. I did some further experimenting with some extra grouping on id. If the data is sorted on id and beg_date descending then I can use the following code in tPerlRow and can skip the filter in the tMap component:&lt;BR /&gt;&lt;PRE&gt;# start part of your Perl code&lt;BR /&gt;my $maxBegDate     = 99991231;&lt;BR /&gt;my $oldBegDate     = null;&lt;BR /&gt;my $currentBegDate = $maxBegDate;&lt;BR /&gt;my $oldId          = null;&lt;BR /&gt;my $currentId      = 0;&lt;BR /&gt;# here is the main part of the component,&lt;BR /&gt;# a piece of code executed in the row&lt;BR /&gt;# loop&lt;BR /&gt;$oldId          = $currentId;&lt;BR /&gt;$currentId      = $tPerlFlex_1;&lt;BR /&gt;$oldBegDate     = $oldId != $currentId ? $maxBegDate : $currentBegDate;&lt;BR /&gt;$currentBegDate = $tPerlFlex_1;&lt;/PRE&gt;&lt;BR /&gt;Now I have the previous value for beg_date per id group.</description>
      <pubDate>Fri, 05 Jan 2007 13:35:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Remember-value-from-previous-row/m-p/2395626#M8148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-05T13:35:34Z</dc:date>
    </item>
  </channel>
</rss>

