<?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 count rows with conditions in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204534#M5379</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp; Ok....make sense.&lt;BR /&gt;&lt;BR /&gt;But i need to count the row just if i match a condition in a string column...in this way i will jusy GroupBy and count all row...&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2019 18:24:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-09T18:24:29Z</dc:date>
    <item>
      <title>How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204529#M5374</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How are you ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;I need to make a transformation and I don't know if talend is possible, but I imagine there is such a possibility.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;Simply put I need to make a pivot table or a kind of "Query" in the table below.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8hF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144874i0FFC4434C139605C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8hF.png" alt="0683p000009M8hF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;It was built as a function of column "JOB" so there are repeated values for JOB and different values for other columns.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;What I need to do is count how many times the "SITUACAO" column has "Encerrado", "Em Separação", "Aguardando Impressão" values for the same "JOB".&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;Ex of output i need : &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;TABLE width="390"&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD width="64"&gt;JOB&lt;/TD&gt; 
   &lt;TD width="78"&gt;Encerrado&lt;/TD&gt; 
   &lt;TD width="101"&gt;Em Separação&lt;/TD&gt; 
   &lt;TD width="147"&gt;Aguardando Impressão&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1122865&lt;/TD&gt; 
   &lt;TD&gt;17&lt;/TD&gt; 
   &lt;TD&gt;2&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;&lt;FONT&gt;Is it possible to do this on the talend?&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;If so, which component should I use to develop this code and if possible how would you do this code in java.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT&gt;I would be grateful for any help.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 12:41:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204529#M5374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T12:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204530#M5375</link>
      <description>&lt;P&gt;Try the TAggregateRow component to group by and count.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 12:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204530#M5375</guid>
      <dc:creator>McJingles</dc:creator>
      <dc:date>2019-12-09T12:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204531#M5376</link>
      <description>&lt;P&gt;I will try.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i do a countif with this component ?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 13:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204531#M5376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T13:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204532#M5377</link>
      <description>&lt;P&gt;I need to make a countif...&lt;BR /&gt;&lt;BR /&gt;When i tried to use this component i face this error mesage&lt;BR /&gt;&lt;BR /&gt;"Warning:the operation 'count' for the output column 'SITUACAO' can't be processed because of incompatible input and/or output types"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6qy.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136969i7355913484B2193B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6qy.png" alt="0683p000009M6qy.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;The column "SITUACAO" is string and i need to count the rowns number not the values&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 14:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204532#M5377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T14:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204533#M5378</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LQIBAA4"&gt;@RenanAraujo&lt;/A&gt;, define one column with int type on the schema of tAggregateRow to receive the value of count function, select this column in the Output column list.</description>
      <pubDate>Mon, 09 Dec 2019 16:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204533#M5378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T16:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204534#M5379</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp; Ok....make sense.&lt;BR /&gt;&lt;BR /&gt;But i need to count the row just if i match a condition in a string column...in this way i will jusy GroupBy and count all row...&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 18:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204534#M5379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T18:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204535#M5380</link>
      <description>&lt;P&gt;Use a tJavaRow before your tAggregateRow to create new columns with the values you need. Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (input_row.SITUACAO!=null &amp;amp;&amp;amp; input_row.SITUACAO.length()&amp;gt;0 &amp;amp;&amp;amp; input_row.SITUACAO.equals("Encerrado"))&lt;/P&gt;&lt;P&gt;{output_row.Encerrado = 1;}&lt;/P&gt;&lt;P&gt;else {output_row.Encerrado = null;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Continue creating columns for each value you need and add them to your output schema. Then count those rows in tAggregateRow, grouping by JOB.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 21:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204535#M5380</guid>
      <dc:creator>cmendels</dc:creator>
      <dc:date>2019-12-09T21:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to count rows with conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204536#M5381</link>
      <description>&lt;P&gt;Alternatively to cmendels's solution one can also use a tMap to create a new column {1,0} column with the desired formula. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 10:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-count-rows-with-conditions/m-p/2204536#M5381</guid>
      <dc:creator>schwarben</dc:creator>
      <dc:date>2021-03-18T10:11:20Z</dc:date>
    </item>
  </channel>
</rss>

