<?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 make this calculation in talend tool in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311512#M82543</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMPMAA4" target="_self"&gt;ciw1973&lt;/A&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Thank you I really appreciate your help&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;whether it is possible to shift previous value based on date&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;we don't change date 01-01-2016 previous weight.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;weight =&amp;nbsp;previous weight(01-01-2016)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;02-01-2016 date itself we need to set previous weight&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;i need below like screenshot&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (135) - Copy.png" style="width: 364px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrSi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151988i99B3604FDE969BC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrSi.png" alt="0683p000009LrSi.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2017 10:10:05 GMT</pubDate>
    <dc:creator>RAJ6</dc:creator>
    <dc:date>2017-11-01T10:10:05Z</dc:date>
    <item>
      <title>how to make this calculation in talend tool</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311510#M82541</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my excel have date,type,weight and point column. I need to create&amp;nbsp;&lt;SPAN&gt;previous weight column&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;How to make below calculation in talend tool&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Step 1:date(01-01-2016)&lt;BR /&gt;based on first date only weight as &lt;FONT color="#339966"&gt;previous weight&lt;FONT color="#000000"&gt;(new column)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;First day i don't need any calculation&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Step 2:date(02-01-2016)&lt;BR /&gt;&lt;SPAN&gt;consider first date&lt;/SPAN&gt; &lt;FONT color="#339966"&gt;previous weight&lt;/FONT&gt;&amp;nbsp;for second Date(02-01-2016)&lt;/P&gt; 
&lt;P&gt;Then i need to do below calculation&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#99CC00"&gt;value&lt;/FONT&gt;=(&lt;FONT color="#339966"&gt;previous weight&lt;/FONT&gt; * point)+&lt;FONT color="#339966"&gt;previous weight&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Step 3:date(03-01-2016)&lt;BR /&gt;&lt;SPAN&gt;consider&amp;nbsp;second date&lt;/SPAN&gt; &lt;FONT color="#99CC00"&gt;value&amp;nbsp;&lt;/FONT&gt;for Third Date(03-01-2016)&amp;nbsp;&lt;FONT color="#339966"&gt;previous weight&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Step 4:date(04-01-2016)&lt;BR /&gt;&lt;SPAN&gt;consider third date&lt;/SPAN&gt;&amp;nbsp;&lt;FONT color="#99CC00"&gt;value&lt;/FONT&gt;&lt;FONT color="#339966"&gt;&amp;nbsp;&lt;/FONT&gt;for fourth Date(04-01-2016)&amp;nbsp;&lt;FONT color="#339966"&gt;previous weight&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Step 5: A&lt;/SPAN&gt;gain step repeated upto the date&lt;/P&gt; 
&lt;P&gt;It's like SQL Lag function.&lt;/P&gt; 
&lt;P&gt;i need to create below like screenshot:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (129).png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrQT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137120i9BFB17C854E18692/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrQT.png" alt="0683p000009LrQT.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311510#M82541</guid>
      <dc:creator>RAJ6</dc:creator>
      <dc:date>2024-11-16T09:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to make this calculation in talend tool</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311511#M82542</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Talend really isn't suited to working with data in spreadsheets&amp;nbsp;like this, but in terms of your calculations, you would be able to expand on the solution I've provided to your LAG function question, here:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCq89CAC" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/How-to-use-SQL-Lag-Function-concept-in-talend/td-p/41233&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You will need to know a bit of Java&amp;nbsp;(which is important for everyone using Talend) but it's mostly just simple expressions for these calculations, and all the basic&amp;nbsp;concepts you require can be found in this simple solution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 08:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311511#M82542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to make this calculation in talend tool</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311512#M82543</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMPMAA4" target="_self"&gt;ciw1973&lt;/A&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Thank you I really appreciate your help&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;whether it is possible to shift previous value based on date&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;we don't change date 01-01-2016 previous weight.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;weight =&amp;nbsp;previous weight(01-01-2016)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;02-01-2016 date itself we need to set previous weight&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;i need below like screenshot&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Six-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (135) - Copy.png" style="width: 364px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrSi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151988i99B3604FDE969BC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrSi.png" alt="0683p000009LrSi.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 10:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311512#M82543</guid>
      <dc:creator>RAJ6</dc:creator>
      <dc:date>2017-11-01T10:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to make this calculation in talend tool</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311513#M82544</link>
      <description>&lt;P&gt;You can do this by using a Dictionary to store multiple previous values instead of just a single Integer variable.&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="LagFunctionJob2.png" style="width: 575px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrUv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157628i336F444BBC56AA31/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrUv.png" alt="0683p000009LrUv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The tFixedFlowInput now has two columns, one for the type and one for the weight:&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="tFixedFlowInput4.png" style="width: 571px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrg0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154827i205A02E53A913995/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrg0.png" alt="0683p000009Lrg0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As before, we introduce a&amp;nbsp;column for the previous weight in the output schema of the tJavaFlex:&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="tJavaFlexSchema4.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrNK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155703iBDD54736BF1141C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrNK.png" alt="0683p000009LrNK.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And the code now stores the previous weight for each type in a Dictionary:&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="tJavaFlexCode2.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrgA.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140591i4EFFCB782CC63C75/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrgA.png" alt="0683p000009LrgA.png" /&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;PRE&gt;java.util.Dictionary&amp;lt;String, Integer&amp;gt; previousWeights = new java.util.Hashtable&amp;lt;String, Integer&amp;gt;();&lt;/PRE&gt; 
&lt;PRE&gt;row2.previousWeight = previousWeights.get(row1.type);
previousWeights.put(row1.type, row1.weight);&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm deliverately ignoring the date side of things here, as I'm assuming they may not be consecutive, and you simply want the previous weight for each type.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 12:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-make-this-calculation-in-talend-tool/m-p/2311513#M82544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-01T12:59:21Z</dc:date>
    </item>
  </channel>
</rss>

