<?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: Find value in range in different rows Need advice in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328438#M97722</link>
    <description>&lt;P&gt;Not a problem, your English is better than my ....any other language &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Sep 2017 14:06:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-03T14:06:22Z</dc:date>
    <item>
      <title>Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328433#M97717</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a TOS and Java newbie.&lt;/P&gt;&lt;P&gt;My problem:&lt;/P&gt;&lt;P&gt;I have to CSV files&lt;/P&gt;&lt;P&gt;1) consumed quantitiy&lt;/P&gt;&lt;P&gt;Key &amp;nbsp;Quantity&lt;/P&gt;&lt;P&gt;aa &amp;nbsp; &amp;nbsp;250&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) priceliste&lt;/P&gt;&lt;P&gt;Key Quantity price&lt;/P&gt;&lt;P&gt;aa &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.0&lt;/P&gt;&lt;P&gt;aa &amp;nbsp; &amp;nbsp;200 &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.5&lt;/P&gt;&lt;P&gt;aa &amp;nbsp; &amp;nbsp;300 &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to find the price 3.5&lt;/P&gt;&lt;P&gt;The consumed quantity has to be in the range &amp;gt;= row1 and &amp;lt;= row2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know a solution. I'm working with TOS DI 6.3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hu&lt;/P&gt;&lt;P&gt;3.0&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328433#M97717</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2024-11-16T09:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328434#M97718</link>
      <description>&lt;P&gt;Hi and welcome to the world of Talend &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;First of all, I *think* your requirement is slightly incorrectly specified. You say "&lt;SPAN&gt;The consumed quantity has to be in the range &amp;gt;= row1 and &amp;lt;= row2". Looking at your data, it looks like you are trying to match prices against quantities. Most of the time these are as below....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;0-100 = 4.0&lt;BR /&gt;101-200 = 3.5&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;201-300 = 3.0&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;301-400 = 2.0&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I sense that this is what you mean.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;If so, this example job should show you how to do it. I have used your data (with some extra) to demonstrate. &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Essentially what I am doing here is matching on key and then assigning a boolean variable to say whether the quantity than or equal to the quantity bracket. All rows which match this pass to the next stage. I then sort the data by key, quantity purchased and quantity bracket. From there I use the tAggregateRow, group by key and quantity purchased and then return the last price returned. I have attached the job here. It was built using Talend 6.2.1.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;There are some assumptions I have had to make from your description of the problem. I have also added some extra price brackets. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrPH"&gt;PriceRange.zip&lt;/A&gt;</description>
      <pubDate>Sun, 03 Sep 2017 00:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328434#M97718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-03T00:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328435#M97719</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thanks for your answer. But in one row a a product_id a quantity and a price. E.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Id &amp;nbsp; quantity price&lt;/P&gt;&lt;P&gt;aa &amp;nbsp; &amp;nbsp; 100 &amp;nbsp; &amp;nbsp; 3.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is to find the price, which fits in the range of quantities &amp;nbsp;between 2 rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regs&lt;/P&gt;</description>
      <pubDate>Sun, 03 Sep 2017 11:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328435#M97719</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2017-09-03T11:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328436#M97720</link>
      <description>&lt;P&gt;That is what the job does. You are supplying the quantity ranges on separate rows (from and to), what I am doing is demonstrating a way of dealing with that by using a strict ordering and then an aggregation. If you run the job you should see this. Take a look at the input values. I may have added too many "aa" inputs, but essentially this should meet your requirements.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Sep 2017 13:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328436#M97720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-03T13:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328437#M97721</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot for your example. It solves my problem. Sorry, but my English is very poor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regs&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sun, 03 Sep 2017 14:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328437#M97721</guid>
      <dc:creator>husibilski</dc:creator>
      <dc:date>2017-09-03T14:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Find value in range in different rows Need advice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328438#M97722</link>
      <description>&lt;P&gt;Not a problem, your English is better than my ....any other language &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Sep 2017 14:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-value-in-range-in-different-rows-Need-advice/m-p/2328438#M97722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-03T14:06:22Z</dc:date>
    </item>
  </channel>
</rss>

