<?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: How to compare two rows based on values in a third column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281687#M56137</link>
    <description>&lt;P&gt;I am afraid , all the columns needs to be added in Group By.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2019 14:26:16 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-04-25T14:26:16Z</dc:date>
    <item>
      <title>How to compare two rows based on values in a third column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281684#M56134</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Currently I am struggling with a seemingly easy challenge, but I can't seem to figure out how to do it other than some - not so neat - solutions.&lt;/P&gt; 
&lt;P&gt;In my Input I have a customer number (string), a product code (string), and an indicator (string). example:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Customer Number&lt;/TD&gt; 
   &lt;TD&gt;ProductCode&lt;/TD&gt; 
   &lt;TD&gt;Indicator&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;4880&lt;/TD&gt; 
   &lt;TD&gt;2929&lt;/TD&gt; 
   &lt;TD&gt;0&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;4880&lt;/TD&gt; 
   &lt;TD&gt;2929&lt;/TD&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;5579&lt;/TD&gt; 
   &lt;TD&gt;2929&lt;/TD&gt; 
   &lt;TD&gt;0&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As you can see for customer number 4880 the productcode is the same in row 1 and row 2, but the indicator is different.&lt;/P&gt; 
&lt;P&gt;My preferred outcome would be that Talend would only select the row where the indicator = 1. However for customer number 5579 there is only one row and the indicator is 0. In that case I also want to have that row in my output. Therefore my preferred output would be:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;TABLE&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Customer Number&lt;/TD&gt; 
   &lt;TD&gt;ProductCode&lt;/TD&gt; 
   &lt;TD&gt;Indicator&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;4880&lt;/TD&gt; 
   &lt;TD&gt;2929&lt;/TD&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;5579&lt;/TD&gt; 
   &lt;TD&gt;2929&lt;/TD&gt; 
   &lt;TD&gt;0&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is this something you can do easily, preferably in one tMap, instead of making multiple outputs and comparing them together.&lt;/P&gt; 
&lt;P&gt;ps.&amp;nbsp;(input.Indicator).equals("1") will not work as for 5579 there is only one row with indicator 0 which I want to keep as well.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 12:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281684#M56134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-25T12:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two rows based on values in a third column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281685#M56135</link>
      <description>&lt;P&gt;One of Solution is to use tAggregateRow&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Group by on&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
 &lt;TBODY&gt;
  &lt;TR&gt;
   &lt;TD&gt;Customer Number&lt;/TD&gt;
   &lt;TD&gt;ProductCode&lt;/TD&gt;
  &lt;/TR&gt;
 &lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get Max of Column Indicator.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 12:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281685#M56135</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-04-25T12:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two rows based on values in a third column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281686#M56136</link>
      <description>&lt;P&gt;Hi Abishek,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This indeed works - thanks for the solution.&lt;/P&gt; 
&lt;P&gt;However I am now facing the issue that the output is only containing the grouped by columns.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Next to Customer Number and ProductCode I also have many other columns which I expected to transfer.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I did selected Edit Schema to transfer all from input to output of course as can be seen below.&lt;/P&gt; 
&lt;P&gt;The output I receive is now as expected but almost all columns are empty.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture1.JPG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4F4.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140814i4F05854A57229FB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4F4.jpg" alt="0683p000009M4F4.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture2.JPG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4KO.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132654i2BD8D9B9B328C889/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4KO.jpg" alt="0683p000009M4KO.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Am I missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 14:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281686#M56136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-25T14:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two rows based on values in a third column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281687#M56137</link>
      <description>&lt;P&gt;I am afraid , all the columns needs to be added in Group By.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 14:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281687#M56137</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-04-25T14:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two rows based on values in a third column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281688#M56138</link>
      <description>Unfortunately, yes, but then in my case its not working anymore. What I did was using the tAggregateRow and putting the output in a tHashOutput. In the next subjob I use the tHashOutput as my main input (quite empty), and refill the missing values based on the unique combination of CustomerNumber and ProductCode. So for me it works now.</description>
      <pubDate>Thu, 25 Apr 2019 15:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-two-rows-based-on-values-in-a-third-column/m-p/2281688#M56138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-25T15:06:39Z</dc:date>
    </item>
  </channel>
</rss>

