<?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 Excel file : average on dynamic data in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252153#M35885</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;I’m a beginner with Talend and I can’t figure out how to achieve what I need :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I’ve an Excel file and I need to do the average of all columns for a reference.&lt;/P&gt; 
&lt;P&gt;The issue is that the reference is only on the last row of its subset and the number of rows per reference is variable (from one row to more than 10).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Example of simplified file input file :&lt;/P&gt; 
&lt;P&gt;Ref | temp 1 | temp 2 | temp 3 | Press 1&lt;/P&gt; 
&lt;P&gt;A | 25 | 26 | 80 | 1.5&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;| 30 | 32 | 85 | 1.8&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;B | 32 | 30 | 82 | 2.1&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 30 | 32 | 85 | 1.8&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 31 | 30 | 82 | 2.1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 32 | 29 | 79 | 1.9&lt;/P&gt; 
&lt;P&gt;C | 29 | 33 | 80 | 2.0&lt;/P&gt; 
&lt;P&gt;1 row for reference A, two rows for reference B and 4 rows for reference C.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Required output file is :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Ref | temp 1 | temp 2 | temp 3 | Press 1&lt;/P&gt; 
&lt;P&gt;A | 25 | 26 | 80 | 1.5&lt;/P&gt; 
&lt;P&gt;B | 31 | 31 | 83 | 1.7&lt;/P&gt; 
&lt;P&gt;C | 31 | 31 | 82 | 2.0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help.&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 07:57:47 GMT</pubDate>
    <dc:creator>Oli76</dc:creator>
    <dc:date>2020-03-17T07:57:47Z</dc:date>
    <item>
      <title>Excel file : average on dynamic data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252153#M35885</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;I’m a beginner with Talend and I can’t figure out how to achieve what I need :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I’ve an Excel file and I need to do the average of all columns for a reference.&lt;/P&gt; 
&lt;P&gt;The issue is that the reference is only on the last row of its subset and the number of rows per reference is variable (from one row to more than 10).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Example of simplified file input file :&lt;/P&gt; 
&lt;P&gt;Ref | temp 1 | temp 2 | temp 3 | Press 1&lt;/P&gt; 
&lt;P&gt;A | 25 | 26 | 80 | 1.5&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;| 30 | 32 | 85 | 1.8&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;B | 32 | 30 | 82 | 2.1&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 30 | 32 | 85 | 1.8&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 31 | 30 | 82 | 2.1&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;| 32 | 29 | 79 | 1.9&lt;/P&gt; 
&lt;P&gt;C | 29 | 33 | 80 | 2.0&lt;/P&gt; 
&lt;P&gt;1 row for reference A, two rows for reference B and 4 rows for reference C.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Required output file is :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Ref | temp 1 | temp 2 | temp 3 | Press 1&lt;/P&gt; 
&lt;P&gt;A | 25 | 26 | 80 | 1.5&lt;/P&gt; 
&lt;P&gt;B | 31 | 31 | 83 | 1.7&lt;/P&gt; 
&lt;P&gt;C | 31 | 31 | 82 | 2.0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help.&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 07:57:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252153#M35885</guid>
      <dc:creator>Oli76</dc:creator>
      <dc:date>2020-03-17T07:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Excel file : average on dynamic data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252154#M35886</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;The trick to accomplish this requirement is adding a sequence id for each row and sort the rows order by sequence id, fill in the null value with last non-null value in Ref column, finally, do the average of all columns on tAggregateRow component. See images.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-03-20_16-11-53.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9mV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153987i1A82243BC5B0907A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9mV.png" alt="0683p000009M9mV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-03-20_16-11-05.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9ma.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154342i09CB632B2C967400/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9ma.png" alt="0683p000009M9ma.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-03-20_16-10-51.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9mf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137734iE38BD00D020E69F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9mf.png" alt="0683p000009M9mf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-03-20_16-10-17.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9mk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155815iB4B94CF8B169D82B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9mk.png" alt="0683p000009M9mk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-03-20_16-09-06.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9mp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142801iAC5EA5A9C0B4A9ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9mp.png" alt="0683p000009M9mp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Code on tJavaRow:&lt;/P&gt; 
&lt;P&gt;output_row.id = input_row.id;&lt;/P&gt; 
&lt;P&gt;output_row.temp1 = input_row.temp1;&lt;BR /&gt;output_row.temp2 = input_row.temp2;&lt;/P&gt; 
&lt;P&gt;if(input_row.Ref==null){&lt;BR /&gt;output_row.Ref=(String)globalMap.get("key");&lt;BR /&gt;}else{&lt;BR /&gt;output_row.Ref=input_row.Ref;&lt;BR /&gt;globalMap.put("key",input_row.Ref);&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 08:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252154#M35886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T08:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel file : average on dynamic data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252155#M35887</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the id column tips.&lt;/P&gt;
&lt;P&gt;I was looking how to sort my file in decreasing order but can't figure out how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll do what you propose.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 10:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Excel-file-average-on-dynamic-data/m-p/2252155#M35887</guid>
      <dc:creator>Oli76</dc:creator>
      <dc:date>2020-03-20T10:59:05Z</dc:date>
    </item>
  </channel>
</rss>

