<?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: Count Based on the sequence generated from the data in incremental fashion in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376204#M138429</link>
    <description>&lt;P&gt;use tMap.&lt;/P&gt;
&lt;P&gt;add 2 var Var1 and Var2.&lt;/P&gt;
&lt;P&gt;fill seqnumber into the second var (Var2)&lt;/P&gt;
&lt;P&gt;fill the first Var1 with&amp;nbsp;if Var2 != seqnumber then&amp;nbsp;Add 1 else add 0&lt;/P&gt;
&lt;P&gt;Something like: (Var.var2==rowX.seqNumber)?Var.var1:Var.var1+1)&lt;/P&gt;
&lt;P&gt;Done&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 11:05:47 GMT</pubDate>
    <dc:creator>fdenis</dc:creator>
    <dc:date>2018-06-12T11:05:47Z</dc:date>
    <item>
      <title>Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376203#M138428</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Sequence Number&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count&lt;/P&gt;
&lt;P&gt;1. seq97016456712017-05-11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;2 .&lt;SPAN&gt;seq97016456712017-05-11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;&lt;SPAN&gt;seq97016456712017-05-12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4. seq97016456712017-05-12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How to generate the sequence based on the sequence Number if the sequence number is same the count should remain the same .How to do that ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 07:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376203#M138428</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2018-06-12T07:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376204#M138429</link>
      <description>&lt;P&gt;use tMap.&lt;/P&gt;
&lt;P&gt;add 2 var Var1 and Var2.&lt;/P&gt;
&lt;P&gt;fill seqnumber into the second var (Var2)&lt;/P&gt;
&lt;P&gt;fill the first Var1 with&amp;nbsp;if Var2 != seqnumber then&amp;nbsp;Add 1 else add 0&lt;/P&gt;
&lt;P&gt;Something like: (Var.var2==rowX.seqNumber)?Var.var1:Var.var1+1)&lt;/P&gt;
&lt;P&gt;Done&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376204#M138429</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-12T11:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376205#M138430</link>
      <description>&lt;P&gt;One way of achieving this would be using a combination of tSortRow -- tMap. In tMap we basically have to store the previous row value and compare it against the current row value and derive the count.&lt;/P&gt; 
&lt;P&gt;Sample Job Flow -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap-Seq1.JPG" style="width: 522px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly4z.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148435i7B15320DD3A93091/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly4z.jpg" alt="0683p000009Ly4z.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Sample data -&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFixedFlowInput-1.JPG" style="width: 772px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyGZ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141193iB622E53C65F29617/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyGZ.jpg" alt="0683p000009LyGZ.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMap logic -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap-Seq2.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly86.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145487i190DCC8E363C1F06/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly86.jpg" alt="0683p000009Ly86.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376205#M138430</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-06-12T15:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376206#M138431</link>
      <description>&lt;P&gt;There is an easy way of doing this with a tMap, using your sequence number. Your sequence is a String and therefore you can use it as the sequence name for the&amp;nbsp;routines.Numeric.sequence(seqName, startValue, step) routine method. So in your tMap you would create a tMap variable with this code in it....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;routines.Numeric.sequence(row1.seqNum, 0, 1)&lt;/PRE&gt;
&lt;P&gt;I've assumed your sequence number is in a row called "row1" and a column called "seqNum".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376206#M138431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T15:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376207#M138432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;- I am just trying to understand your suggested method. If I am not wrong by putting a&amp;nbsp;Numeric.sequence on&amp;nbsp;SequenceNumber would result an incremented number being generated for every record and it would start from zero again for any new&amp;nbsp;&lt;SPAN&gt;SequenceNumber.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376207#M138432</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-06-12T17:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376208#M138433</link>
      <description>&lt;P&gt;Sorry, I think I may have misunderstood your requirement. What you describe is exactly what would happen, but I see you actually want to group by the sequence number and not increment per sequence number&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376208#M138433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T17:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on the sequence generated from the data in incremental fashion</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376209#M138434</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have Done the same using a user routine for getting the distinct count based on some field and i have completed that.&lt;/P&gt; 
&lt;P&gt;Thanks ,&lt;/P&gt; 
&lt;P&gt;kasthuri Rengan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 06:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-Based-on-the-sequence-generated-from-the-data-in/m-p/2376209#M138434</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2018-06-13T06:29:39Z</dc:date>
    </item>
  </channel>
</rss>

