<?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: Calculation of a value based on two values in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284291#M58013</link>
    <description>&lt;P&gt;This is very easy to do. Lets assume your starting and ending values are in columns A and B in your Excel spreadsheet. You configure your tFileInputExcel component so that you are bringing in columns A and B. This is described in the documentation for the component. Once you have done this, add a tMap component. In this component you can set the output "table" to have 3 columns (A, B and C). You may your input column A to the output column A, B to B and in the output of C you would have some code looking something like this....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;row1.B!=null &amp;amp;&amp;amp; row1.A!=null ? row1.B - row1.A : 0&lt;/PRE&gt;
&lt;P&gt;The above will first check that the values of A and B are not null. It then subtracts A from B. If either of the values are null, it will return 0.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 10:54:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-03T10:54:29Z</dc:date>
    <item>
      <title>Calculation of a value based on two values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284290#M58012</link>
      <description>&lt;P&gt;Dear All&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to Talend and I'm trying to learn it know. I already saw most of the available videos and I have to say that's an amazing tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So let's go to the topic. I need to calculate a value based on two columns from a excel file. I have the Starting Kms&amp;nbsp; and&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the arriving Kms and with the collection of the data I wont to have a column with the difference between this 2 values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This way I will have the traveled Kms by a car or person.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible to do in Talend? if Yes how can I do it? Is it inside Tmap?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nelson Parreira&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284290#M58012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of a value based on two values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284291#M58013</link>
      <description>&lt;P&gt;This is very easy to do. Lets assume your starting and ending values are in columns A and B in your Excel spreadsheet. You configure your tFileInputExcel component so that you are bringing in columns A and B. This is described in the documentation for the component. Once you have done this, add a tMap component. In this component you can set the output "table" to have 3 columns (A, B and C). You may your input column A to the output column A, B to B and in the output of C you would have some code looking something like this....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;row1.B!=null &amp;amp;&amp;amp; row1.A!=null ? row1.B - row1.A : 0&lt;/PRE&gt;
&lt;P&gt;The above will first check that the values of A and B are not null. It then subtracts A from B. If either of the values are null, it will return 0.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 10:54:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284291#M58013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-03T10:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of a value based on two values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284292#M58014</link>
      <description>&lt;P&gt;Great rhall_2_0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It was exactly what I was looking for. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 16:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculation-of-a-value-based-on-two-values/m-p/2284292#M58014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-03T16:08:29Z</dc:date>
    </item>
  </channel>
</rss>

