<?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: [resolved] tAggregateRow to sum multiple columns in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366535#M130010</link>
    <description>Hi Balaji, glad it worked.  We are all always learning.</description>
    <pubDate>Tue, 15 May 2012 22:43:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-15T22:43:55Z</dc:date>
    <item>
      <title>[resolved] tAggregateRow to sum multiple columns</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366532#M130007</link>
      <description>Hi,
&lt;BR /&gt;I have file which has the data like this.
&lt;BR /&gt;Order#;VAS1 Quantity;VAS1 Amount;VAS2 Quantity;VAS2 Amount;VAS3 Quantity;VAS3 Amount
&lt;BR /&gt;1000; 1; 5.5; 1; 4.0; 0; 0
&lt;BR /&gt;2000; 2; 11.0; 1; 4.0; 1; 5.0
&lt;BR /&gt;1000; 1; 5.5; 2; 8.0; 1; 5.0
&lt;BR /&gt;3000; 1; 5.5; 1; 4.0; 2; 10.0
&lt;BR /&gt;3000; 0; 0.0 2; 8.0; 1; 5.0
&lt;BR /&gt;I need the output as shown below. The second column is the sum of vas1quantity+vas2quantity+vas3quantity and the third column is the sum of vas1amount+vas2amount+vas3amount, grouped by order #. The input file has 2 records for order # 1000, so, the sum function should take the quantities and amount from both records.
&lt;BR /&gt;Order #;VAS Quantity; VAS Amount
&lt;BR /&gt;1000; 6; 28.0
&lt;BR /&gt;2000; 4; 20.0
&lt;BR /&gt;3000; 7; 32.5
&lt;BR /&gt;Can some one help me to acheive the result? I know I can do it with a tFlowToIterate and tJavaFlex, but I prefer to use something like a tAggregateRow.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Balaji.</description>
      <pubDate>Mon, 14 May 2012 19:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366532#M130007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T19:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tAggregateRow to sum multiple columns</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366533#M130008</link>
      <description>There are 2 steps 
&lt;BR /&gt;First, combine the fields in a tMap 
&lt;BR /&gt;send the input to a tMap. 
&lt;BR /&gt;on the output side of the tMap have 3 fields: order_num, vas_quantity, and vas_amount 
&lt;BR /&gt;set the order_num expression to: row1.order 
&lt;BR /&gt;set the vas_quantity expression to: row1.VAS1Quantity + row1.VAS2Quantity + row1.VAS3Quantity 
&lt;BR /&gt;set the vas_amount expression to: row1.VAS1Amount + row1.VAS2Amount + row1.VAS3Amount 
&lt;BR /&gt; 
&lt;BR /&gt;Step 2, aggregate the output in a tAggregateRow 
&lt;BR /&gt;group by order_num 
&lt;BR /&gt;sum(vas_quantity) 
&lt;BR /&gt;sum(vas_amount)</description>
      <pubDate>Mon, 14 May 2012 21:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366533#M130008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T21:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tAggregateRow to sum multiple columns</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366534#M130009</link>
      <description>Thanks, it worked. I should have thought about it, my bad.&lt;BR /&gt;Thanks,&lt;BR /&gt;Balaji.</description>
      <pubDate>Mon, 14 May 2012 22:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366534#M130009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T22:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tAggregateRow to sum multiple columns</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366535#M130010</link>
      <description>Hi Balaji, glad it worked.  We are all always learning.</description>
      <pubDate>Tue, 15 May 2012 22:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366535#M130010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T22:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tAggregateRow to sum multiple columns</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366536#M130011</link>
      <description>Hi ,
&lt;BR /&gt;
&lt;BR /&gt;actually I tried the same to sum up value from multiple colomns from my input excel file , I have 12 colomns (sales per months ) and I have to sum up to get the annual sales ,so I have added tmap and set :
&lt;BR /&gt;row1.Jan_sales+row1.Feb_sales+...+row1.Dec_sales &amp;lt;==&amp;gt; Annual_sales
&lt;BR /&gt;but it fails as it doesnt recognized colmns after row1.June_sales .
&lt;BR /&gt;Any idea how I can overcome this to calculate the annual sales from my input excel ?
&lt;BR /&gt;
&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Sun, 10 May 2020 02:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tAggregateRow-to-sum-multiple-columns/m-p/2366536#M130011</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-10T02:11:50Z</dc:date>
    </item>
  </channel>
</rss>

