<?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: Talend calculation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348299#M115446</link>
    <description>&lt;P&gt;Assuming your data looks similar to this.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Day&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Miles&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;150&lt;/P&gt; 
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;175&lt;/P&gt; 
&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;230&lt;BR /&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;301&lt;BR /&gt;&lt;BR /&gt;.....and you want to get the values.....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;1 = 100&lt;BR /&gt;2= 50&lt;BR /&gt;3 = 25&lt;BR /&gt;4 = 55&lt;/P&gt; 
&lt;P&gt;5 = 71&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;....you can do it with a tMap. I have done this to demonstrate. The screenshot of the tMap is below....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="distance.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrqL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158031i3842B98126162289/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrqL.png" alt="0683p000009LrqL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The tMap variables (the box in the middle) must be set up exactly as above. The expressions are....&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;todaysDistance&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.lastDistance!=null ? row1.miles - Var.lastDistance : row1.miles &lt;/PRE&gt; 
&lt;P&gt;&lt;STRONG&gt;lastDistance&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;row1.miles &lt;/PRE&gt; 
&lt;P&gt;The trick here is that the tMap variables keep their values between rows and are processed in order.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;Your dates must come in in order for this.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 12:35:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-28T12:35:05Z</dc:date>
    <item>
      <title>Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348298#M115445</link>
      <description>&lt;P&gt;&lt;BR /&gt;How to get the actual value from the cummulative value in talend ? for example On a paricular a car runs for 1000 kms next day the car will start from 1001 kms ,So what i need is how to calculate the total kms covered on a particular day&lt;/P&gt; 
&lt;P&gt;1000kms on 27-10-2017 2000kms on 28-10-2017&lt;/P&gt; 
&lt;P&gt;so the total kms covered on 28-10-2017 is 1000kms how to do that in talend for which i need to update around 1 lakh history records using the above method and this needs to be done in mongodb&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348298#M115445</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T12:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348299#M115446</link>
      <description>&lt;P&gt;Assuming your data looks similar to this.....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Day&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Miles&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;150&lt;/P&gt; 
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;175&lt;/P&gt; 
&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;230&lt;BR /&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;301&lt;BR /&gt;&lt;BR /&gt;.....and you want to get the values.....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;1 = 100&lt;BR /&gt;2= 50&lt;BR /&gt;3 = 25&lt;BR /&gt;4 = 55&lt;/P&gt; 
&lt;P&gt;5 = 71&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;....you can do it with a tMap. I have done this to demonstrate. The screenshot of the tMap is below....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="distance.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrqL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158031i3842B98126162289/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrqL.png" alt="0683p000009LrqL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The tMap variables (the box in the middle) must be set up exactly as above. The expressions are....&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;todaysDistance&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.lastDistance!=null ? row1.miles - Var.lastDistance : row1.miles &lt;/PRE&gt; 
&lt;P&gt;&lt;STRONG&gt;lastDistance&lt;/STRONG&gt;&lt;/P&gt; 
&lt;PRE&gt;row1.miles &lt;/PRE&gt; 
&lt;P&gt;The trick here is that the tMap variables keep their values between rows and are processed in order.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;Your dates must come in in order for this.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348299#M115446</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-28T12:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348300#M115447</link>
      <description>Hi , 
&lt;BR /&gt;i am not getting the solution you gave .Can you please elaborate on this whether i need to use tmemorizerow for memorising the previous value or something like that ? 
&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348300#M115447</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T12:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348301#M115448</link>
      <description>&lt;P&gt;I need to calculate based on the customer id how to include that condition in tmap&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348301#M115448</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T12:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348302#M115449</link>
      <description>&lt;P&gt;You do not need to use tMemorizeRow. This configuration will work without that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do this via CustomerId, you will need to sort your data by CustomerID and date first (tSortRow), then have some logic to decide when your CustomerId switches. You can do this using the tMap variables as well. However this is a different question and I have thrown away my example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Accept this as the solution (if it shows the distance between days, forgetting the CustomerID) and raise the CustomerID changing as a different question. There should only be one question per&amp;nbsp; post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348302#M115449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-28T13:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348303#M115450</link>
      <description>&lt;P&gt;The operator != is undefined for the argument type(s) int, null&lt;BR /&gt;There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio. Is the error i am getting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348303#M115450</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T13:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348304#M115451</link>
      <description>The operator != is undefined for the argument type(s) int, null&lt;BR /&gt;There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio. Is the error i am getting&lt;BR /&gt;&amp;nbsp; the source data type is integer&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348304#M115451</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348305#M115452</link>
      <description>i am getting the cummulative value not the subtracted one</description>
      <pubDate>Tue, 28 Nov 2017 14:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348305#M115452</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T14:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348306#M115453</link>
      <description>&lt;P&gt;If you are using Talend 6 you should be using java 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int is a primitive type. This means that your tick boxes next to your variable config are not ticked. The "Nullable" tick box means they become Integer objects instead of int types.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 14:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348306#M115453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-28T14:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348307#M115454</link>
      <description>&lt;P&gt;Not if you are following the example I gave you. Can you take a screenshot of what you have?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 14:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348307#M115454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-28T14:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348308#M115455</link>
      <description>&lt;P&gt;11569|1&lt;BR /&gt;27752|1&lt;BR /&gt;27797|1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is the output i am getting instead of the expected one.&lt;/P&gt;
&lt;P&gt;The expression used are as follows&lt;/P&gt;
&lt;P&gt;Var.lastDistance!=null ? row1.distance - Var.lastDistance : row1.distance&amp;nbsp; for today distance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;row1.distance&amp;nbsp; for last distance&lt;/P&gt;
&lt;P&gt;Please tell me what is the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 14:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348308#M115455</guid>
      <dc:creator>krengan21</dc:creator>
      <dc:date>2017-11-28T14:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Talend calculation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348309#M115456</link>
      <description>&lt;P&gt;I need a screenshot of your tMap config&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 14:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-calculation/m-p/2348309#M115456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-28T14:20:31Z</dc:date>
    </item>
  </channel>
</rss>

