<?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: Operation in script with two differnet field from different Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968473#M331800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, of course that will work. Make sure that the Company names in the mapping table are the same as the ones you pass as second parameter in the applymap() call. I included the original replace calls to match your example code. Leave them out if you do not need them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Dec 2015 14:13:14 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-12-08T14:13:14Z</dc:date>
    <item>
      <title>Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968465#M331792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I have this script&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Immaginescr.png" class="jive-image image-1" height="279" src="https://community.qlik.com/legacyfs/online/108338_Immaginescr.png" style="height: 279px; width: 385.916px;" width="386" /&gt;&lt;/P&gt;&lt;P&gt;Now I just need a variable that for each Production for the second table, divide each N in the first table.&lt;/P&gt;&lt;P&gt;Someting like this : (AC/N) as Power. The fild come from the same table but in the first one I need to take just 1 row and in the second table I need to take 24 rows. &lt;/P&gt;&lt;P&gt;There is some way to reload the Leinstung in the second table or have this operation in a good way? &lt;/P&gt;&lt;P&gt;Thanks for help me&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pasquale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 08:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968465#M331792</guid>
      <dc:creator>pascos88</dc:creator>
      <dc:date>2015-12-08T08:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968466#M331793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why you want to do at script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not at UI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 08:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968466#M331793</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-08T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968467#M331794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balraj,&lt;/P&gt;&lt;P&gt;Thanks for the response&lt;/P&gt;&lt;P&gt;I prefer to do this in a script becouse I need to use this operation a lot of time. &lt;/P&gt;&lt;P&gt;I need to do something like this : &lt;/P&gt;&lt;P&gt;(AC/N) as A&lt;/P&gt;&lt;P&gt;(AF/N) as B&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;In the chart I need to have also somethings like A-B/B..&lt;/P&gt;&lt;P&gt;You can see that it will be more easy to manage &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 08:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968467#M331794</guid>
      <dc:creator>pascos88</dc:creator>
      <dc:date>2015-12-08T08:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968468#M331795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well to do this, as per my knowledge..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First combine all the fields into one final table either by Join, Concatenation etc..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then only you would be able to do it&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 09:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968468#M331795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-08T09:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968469#M331796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a mapping table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Company_N_map:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mapping load &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NomeCompany,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;resident LeinstungPark ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop table LeinstungPark ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can add this line to the IST table as a preceding load to get N into the IST table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IST:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; apply map('Company_N_map', NomeCompany) as N,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AB as Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It would be easier to help if you posted the script as text rather than an image, then we can edit your script to show the solution.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 09:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968469#M331796</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-12-08T09:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968470#M331797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, Production/NValue as NewProductionValue,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Revenue / NValue as NewRevenueValue;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;LookUp('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Leinstung', 'NomeCompany', NomeCompany, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LeinstungPark&lt;/SPAN&gt;') as NValue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;resident IST;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table IST;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 10:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968470#M331797</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-12-08T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968471#M331798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first table, you perform a Lookup of the first N value for every company (better replace the FOR loop with a GROUP BY and a WHERE Match()..., but that's beside your question). This means that every company has only one N value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store this in a mapping table composed of&amp;nbsp; NomeCompany and N fields. Let's call that one &lt;SPAN style="font-family: 'courier new', courier;"&gt;MapComp2N&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;In the second table, get a specific N value by performing an &lt;SPAN style="font-family: 'courier new', courier;"&gt;applymap()&lt;/SPAN&gt; in this style:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...AC / applymap('MapComp2N', replace(replace(...))) AS ProductionDividedByN, ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second FOR loop can also be replaced by a LOAD WHERE Match or WHERE Exists() but again that's a different topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 10:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968471#M331798</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-08T10:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968472#M331799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Peter, &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;thank for response.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I can't understand why you use the replace function in the applymap?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;If I use mapping load&amp;nbsp; in the first table of my example and use replace there in order to have the same NomeCompany, end if I use apply map in table 2&amp;nbsp; just like this:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;BR /&gt;ITS:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load *,..... applymap('LeinstungPark', NomeCompany) as N&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;it will be works?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968472#M331799</guid>
      <dc:creator>pascos88</dc:creator>
      <dc:date>2015-12-08T13:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968473#M331800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, of course that will work. Make sure that the Company names in the mapping table are the same as the ones you pass as second parameter in the applymap() call. I included the original replace calls to match your example code. Leave them out if you do not need them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 14:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968473#M331800</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-08T14:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Operation in script with two differnet field from different Table</title>
      <link>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968474#M331801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The basic idea in Qlikview combine the these two tables into one table by either Join or ApplyMap approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that perform your calculations add new fields. Please use proer keys to combine the tables otherwise you end up with ambiguous results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 16:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Operation-in-script-with-two-differnet-field-from-different/m-p/968474#M331801</guid>
      <dc:creator />
      <dc:date>2015-12-08T16:53:08Z</dc:date>
    </item>
  </channel>
</rss>

