<?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: Inserting total count of passed conditional expression to a column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237869#M26160</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQI2AAO"&gt;@KathikVenky&lt;/A&gt;, does this help?&lt;/P&gt;
&lt;P&gt;If so, thank's to mark your case as solved.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 09:19:23 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2019-09-12T09:19:23Z</dc:date>
    <item>
      <title>Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237862#M26153</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am having a Source table containing Current_Month,Date of Joining(DOJ) and Date of Separation(DOS).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And in Destination table I have head count, where i need to insert head count of employee based on below condition,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;COUNT(((TalendDate.formatDate("MMM-yy", row1.DOJ)&amp;lt;=Current_Month) &amp;amp;&amp;amp;&lt;BR /&gt;(TalendDate.formatDate("MMM-yy", row1.DOS)&amp;gt;=Current_Month))?1:0)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have used above expression on head count column in destination table. But it is not working. Could you please assist me, how to get solved.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237862#M26153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237863#M26154</link>
      <description>&lt;P&gt;Where are you trying to use this expression? Is it being used in SQL or Java?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 12:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237863#M26154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T12:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237864#M26155</link>
      <description>You cannot compare dates based on MMM as "OCT" will be considered as less than "SEP" but in fact it's greater (10 &amp;gt; 09).&lt;BR /&gt;Instead you should use TalendDate.compareDate().</description>
      <pubDate>Wed, 11 Sep 2019 12:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237864#M26155</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-11T12:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237865#M26156</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;@ I am trying to use it in expression builder function. If so its possible in java or sql. Could please let me know hownit can be approached&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237865#M26156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237866#M26157</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp; yea understood. I can use&amp;nbsp;&lt;SPAN&gt;TalendDate.compareDate() but later part of which i need to count number of passed condition. And insert that value in all rows of that column.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237866#M26157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T13:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237867#M26158</link>
      <description>&lt;P&gt;"Count" is not a Java method I am aware of, but it is a SQL function. If you are trying to use this in a database component, then you need to do this in a different way to if you are doing this in a tMap or tJava, for example. By the way, given the logic you have here with the 0 : 1 I assume that you want to use something like "Sum" rather than "Count" if this is meant to be run by your database.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237867#M26158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-11T13:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237868#M26159</link>
      <description>&lt;P&gt;Based on the following data:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample.png" style="width: 313px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7GM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158318iFC355283C11864F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7GM.png" alt="0683p000009M7GM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;you can use the following tMap to determine for each row if it should be set to 0 or 1:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M75Q.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157797i279A92C4B0734AD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M75Q.png" alt="0683p000009M75Q.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Then, you have to aggregate the result:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tAggregate.png" style="width: 921px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Di.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143237i6690A3604276336F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Di.png" alt="0683p000009M7Di.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Here is the result:&lt;/P&gt; 
&lt;PRE&gt;|=-----------+----=|
|CurrentMonth|Count|
|=-----------+----=|
|2019-09     |1    |
|2019-10     |1    |
'------------+-----'&lt;/PRE&gt; 
&lt;P&gt;Is that what you expect?&lt;/P&gt; 
&lt;P&gt;Else, give more details (where sample data and expected result).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is the whole job:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="job.png" style="width: 645px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Dn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142234iB6C08D660AE343D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Dn.png" alt="0683p000009M7Dn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 15:27:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237868#M26159</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-11T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting total count of passed conditional expression to a column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237869#M26160</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQI2AAO"&gt;@KathikVenky&lt;/A&gt;, does this help?&lt;/P&gt;
&lt;P&gt;If so, thank's to mark your case as solved.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 09:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Inserting-total-count-of-passed-conditional-expression-to-a/m-p/2237869#M26160</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-09-12T09:19:23Z</dc:date>
    </item>
  </channel>
</rss>

