<?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 Creating a calculation in Script from 2 different Tabs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269779#M1191349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;SPAN class="replyToName" style="font-size: 14px;"&gt;krishnamoorthy,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;I could get to create a calculated field when creating charts using expression (ActualAmount * ConversionRate), but wanted to see if there is a way i can include this calculation in the Load Script so User no need to compute this logic each time and have him/her pull from Available Fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;As per your suggestion, I could bring the ConversionRate table to Transactions Tab and script as join and then calculate the BaseAmoun. Can you please explain on second option you mentioned- "mapping load of ConversionRate" . I wanted to try this option also and see which would be best for our needs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;Kalyan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jul 2011 13:13:10 GMT</pubDate>
    <dc:creator>nadkalyan</dc:creator>
    <dc:date>2011-07-11T13:13:10Z</dc:date>
    <item>
      <title>Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269777#M1191347</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;I need to create a calculated field in script from 2 different tabs in Edit Script of Qlikview document. In Tab1(let's call it 'Conversion Rate' Tab) we have Conversion Rates column and Tab2 (Lets call it 'Transactions' tab) which has all the transactions. Now i need to add a calculated column in 'Transactions' tab that calculates Base Amount (ActualAmount * ConversionRate)&amp;nbsp; where ActualAmount is from 'Transactions' Tab while ConversionRate in 'Conversion Rate' tab. Any Ideas how can I acheive this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 00:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269777#M1191347</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2011-07-11T00:23:38Z</dc:date>
    </item>
    <item>
      <title>Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269778#M1191348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the Transactions table and [Conversion Rate] table are linked by the currency code field, you can calculate the Base Amount in the charts, using the expression given by you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do the calculation in the load script, you may have to bring the ConversionRate to the Transactions table using a left join or mapping load of ConversionRate and then calculate the Base Amount in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 01:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269778#M1191348</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-07-11T01:10:34Z</dc:date>
    </item>
    <item>
      <title>Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269779#M1191349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;SPAN class="replyToName" style="font-size: 14px;"&gt;krishnamoorthy,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;I could get to create a calculated field when creating charts using expression (ActualAmount * ConversionRate), but wanted to see if there is a way i can include this calculation in the Load Script so User no need to compute this logic each time and have him/her pull from Available Fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;As per your suggestion, I could bring the ConversionRate table to Transactions Tab and script as join and then calculate the BaseAmoun. Can you please explain on second option you mentioned- "mapping load of ConversionRate" . I wanted to try this option also and see which would be best for our needs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;Kalyan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName" style="font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 13:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269779#M1191349</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2011-07-11T13:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269780#M1191350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see if the attached example helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code used in the example for mapping load is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;ConversionRateMapping:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;Mapping LOAD * Inline [&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;Cur, Rate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;USD, 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;CAD, 1.1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;AUD, 0.75&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;];&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;Tnx:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('ConversionRateMapping',Cur,1) as ConvRate,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('ConversionRateMapping',Cur,1)*Amt as BaseAmount;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;ID, Cur, Amt&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;1,USD, 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;2,CAD, 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;3,AUD, 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;];&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 13:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269780#M1191350</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-07-11T13:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269781#M1191351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have two options for Mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine you have only numbers for your items and you also want to see the item-name in the table2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;MAPPING LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;/P&gt;&lt;P&gt;FROM dbsource;&lt;/P&gt;&lt;P&gt;table1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAP name USING table;&lt;/P&gt;&lt;P&gt;LOAD field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;/P&gt;&lt;P&gt;FROM dbsource;&lt;/P&gt;&lt;P&gt;=&amp;gt; so you have the item-names as value not the numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second Option:&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;MAPPING LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;/P&gt;&lt;P&gt;FROM dbsource;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;BR /&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('table', item) AS name&lt;/P&gt;&lt;P&gt;FROM dbsource;&lt;/P&gt;&lt;P&gt;=&amp;gt; this option is very useful, if you haven't got the field 'name'&amp;nbsp; in your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important notice: Mapping tables have only two fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards vicky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 13:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269781#M1191351</guid>
      <dc:creator />
      <dc:date>2011-07-11T13:24:10Z</dc:date>
    </item>
    <item>
      <title>Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269782#M1191352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ThankYou Krishnamoorthy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For our requirement bringing in ConversionRate Table and joining with Transaction table seems more logical and simple. It's good to know the mapping logic for future reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 15:23:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269782#M1191352</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2011-07-11T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Creating a calculation in Script from 2 different Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269783#M1191353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Vicky, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; As I said our requirment works with join condition for these tables. Appreciate your suggestions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 15:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-calculation-in-Script-from-2-different-Tabs/m-p/269783#M1191353</guid>
      <dc:creator>nadkalyan</dc:creator>
      <dc:date>2011-07-11T15:24:58Z</dc:date>
    </item>
  </channel>
</rss>

