<?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: Script calculation for growth of animals based on a model in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782584#M1209681</link>
    <description>&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;New Weight=FirstSortedValue([Growth Factor],fAbs(Temperature-[Model Temperature])+fAbs(Weight-[Model Weight]))*Weight&lt;/P&gt;&lt;P&gt;Growth Factor=FirstSortedValue([Growth Factor],fAbs(Temperature-[Model Temperature])+fAbs(Weight-[Model Weight]))&lt;/P&gt;</description>
    <pubDate>Sun, 14 Feb 2021 16:13:44 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2021-02-14T16:13:44Z</dc:date>
    <item>
      <title>Lookup with two parameters - extra hard</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782573#M1209676</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Please help! I am trying to calculate a growth of animals population (production) in a &lt;LI-PRODUCT title="QlikView" id="qlikView"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;#script. We have the first day real weight and we need to forecast in the future the estimated growth (New Weight), as you see on the photo1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1_population_dates.png" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49031i4630780006A2B667/image-size/small?v=v2&amp;amp;px=200" role="button" title="1_population_dates.png" alt="1_population_dates.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is in another table, a growth model which consists in two variables.&lt;BR /&gt;1) Temperature&lt;BR /&gt;2)weight range,&lt;BR /&gt;This table is linked with the "growth model ID" to the "population" of the first table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2_model.png" style="width: 183px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49025i649E8088CA25D846/image-size/small?v=v2&amp;amp;px=200" role="button" title="2_model.png" alt="2_model.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;New weight = previous date weight + (previous date weight*growth factor)&lt;/P&gt;&lt;P&gt;Here is the hard part. How can we determine the growth factor, looking up on the 2nd table? It is based on round(temperature) and the weight &lt;U&gt;range&lt;/U&gt;. For example in the first case, with round(temperature)=14 we pick the red line and growthfactor=0,119. In the second case with round(temperature)=13 we pick the blue line. The weight is not always matching the "model", it is in a range! We have to select the first row where "weight"&amp;gt;=model weight.&lt;/P&gt;&lt;P&gt;Leaving an excel file with data in the attached files.&lt;/P&gt;&lt;P&gt;If anyone could help would be great. &lt;STRONG&gt;I could put an initiative of some 20$ (Paypal transfer) to anyone who solves&lt;/STRONG&gt;, should this be OK with the community's policy.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 16:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782573#M1209676</guid>
      <dc:creator>antonopn</dc:creator>
      <dc:date>2021-02-16T16:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782580#M1209679</link>
      <description>&lt;P&gt;Please upload the excel sheet&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 15:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782580#M1209679</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-14T15:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782581#M1209680</link>
      <description>&lt;P&gt;uploaded in the initial post. many thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 15:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782581#M1209680</guid>
      <dc:creator>antonopn</dc:creator>
      <dc:date>2021-02-14T15:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782584#M1209681</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;New Weight=FirstSortedValue([Growth Factor],fAbs(Temperature-[Model Temperature])+fAbs(Weight-[Model Weight]))*Weight&lt;/P&gt;&lt;P&gt;Growth Factor=FirstSortedValue([Growth Factor],fAbs(Temperature-[Model Temperature])+fAbs(Weight-[Model Weight]))&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 16:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782584#M1209681</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-14T16:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782586#M1209682</link>
      <description>&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV97.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49027iDDF6F3D75BFB79A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV97.PNG" alt="commQV97.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 16:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782586#M1209682</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-14T16:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782587#M1209683</link>
      <description>&lt;P&gt;Looks close, thank you! Actually the field weight is not used. I should ommit it. We need to start from yellow "new weight" and loop. But if your "lookup" function works, maybe I can do the rest with bested loops and "peek". Will let you know&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 16:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782587#M1209683</guid>
      <dc:creator>antonopn</dc:creator>
      <dc:date>2021-02-14T16:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782837#M1209703</link>
      <description>&lt;P&gt;Any proposal please? &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 18:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782837#M1209703</guid>
      <dc:creator>antonopn</dc:creator>
      <dc:date>2021-02-15T18:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782849#M1209704</link>
      <description>&lt;P&gt;So, my solution is not working?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:43:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782849#M1209704</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-15T19:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script calculation for growth of animals based on a model</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782850#M1209705</link>
      <description>&lt;P&gt;No. I answered above. But thank you so much for your effort! Found a way to do the looping though. Seems the only problem now is how&amp;nbsp; to lookup with two parameters on the script, based on a previously loaded table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-with-two-parameters-extra-hard/m-p/1782850#M1209705</guid>
      <dc:creator>antonopn</dc:creator>
      <dc:date>2021-02-15T19:46:40Z</dc:date>
    </item>
  </channel>
</rss>

