<?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 Scripting task in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383441#M421402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, please assst with the following issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables:&lt;/P&gt;&lt;P&gt;First table consists of data on "Code", "Month", "Rate"&lt;/P&gt;&lt;P&gt;The second table has data on "Month", "Code" and "Amount".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a result, I need to write script to calculate "Rate" x "Amount". the identificatiors are the "Month" and "Code".&lt;/P&gt;&lt;P&gt;The issue is that the first table do not have complete list of codes. Thus if absent "code" and relevant month, I need to multiply "Amount" to 40%. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried Mapping function but it does not work with more than three fields. &lt;/P&gt;&lt;P&gt;If possible please share your scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Aug 2017 10:33:11 GMT</pubDate>
    <dc:creator>rassanbekov</dc:creator>
    <dc:date>2017-08-25T10:33:11Z</dc:date>
    <item>
      <title>Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383441#M421402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, please assst with the following issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables:&lt;/P&gt;&lt;P&gt;First table consists of data on "Code", "Month", "Rate"&lt;/P&gt;&lt;P&gt;The second table has data on "Month", "Code" and "Amount".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a result, I need to write script to calculate "Rate" x "Amount". the identificatiors are the "Month" and "Code".&lt;/P&gt;&lt;P&gt;The issue is that the first table do not have complete list of codes. Thus if absent "code" and relevant month, I need to multiply "Amount" to 40%. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried Mapping function but it does not work with more than three fields. &lt;/P&gt;&lt;P&gt;If possible please share your scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383441#M421402</guid>
      <dc:creator>rassanbekov</dc:creator>
      <dc:date>2017-08-25T10:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383442#M421403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on where and how you are using this expression, something like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount * Alt(Rate, 0.4)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Amount) * Alt(Rate, 0.4)&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assumes that there at most one Rate for each month/code combination and that there is some sort of relationship between the code and month and the chart dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, post a small example qvw to illustrate the data and your requirements more clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383442#M421403</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-08-25T10:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383443#M421404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the rates per codes are changed monthly...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383443#M421404</guid>
      <dc:creator>rassanbekov</dc:creator>
      <dc:date>2017-08-25T10:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383444#M421405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is to be expected. The amounts and rates are linked with month and code, so no problem there. The amounts are additive but the rates are not, so there should only be one rate per month and code&amp;nbsp; --&amp;nbsp; that is what I assumed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383444#M421405</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-08-25T10:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383445#M421406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruslan,&lt;/P&gt;&lt;P&gt;Sorry to see that this problem is still not resolved. As Jonathan suggests please post sample data or a qvw and I'm sure you can get the advice you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383445#M421406</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-25T10:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383446#M421407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;gt;&amp;gt;... so there should only be one rate per month and code ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Some month/code combinations have no rates, so the Alt() converts these missing values to 0.4 (40%)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 10:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383446#M421407</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-08-25T10:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting task</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383447#M421408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use applymap() or just Join the two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Code,&lt;/P&gt;&lt;P&gt;Month,&lt;/P&gt;&lt;P&gt;Rate&lt;/P&gt;&lt;P&gt;Code&amp;amp;'_'&amp;amp;Month as KEY&lt;/P&gt;&lt;P&gt;From XXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapRate:&lt;/P&gt;&lt;P&gt;LOAD Distinct &lt;SPAN style="font-size: 13.3333px;"&gt;KEY,Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Table1;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Code,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Month,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Amount,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Applymap('&lt;SPAN style="font-size: 13.3333px;"&gt;MapRate',&lt;SPAN style="font-size: 13.3333px;"&gt;Code&amp;amp;'_'&amp;amp;Month,null()) as &lt;/SPAN&gt;&lt;/SPAN&gt;Rate,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(Applymap('&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MapRate',&lt;SPAN style="font-size: 13.3333px;"&gt;Code&amp;amp;'_'&amp;amp;Month,null()) *Amount) as Evaluated &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Code&amp;amp;'_'&amp;amp;Month as KEY&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;From XXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;////////////////////////////////////////&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;///////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table1:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Code,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Month,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Rate&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;From XXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;T2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Code,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Month,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Amount&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;From YYYY&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NOCONCATENATE&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Main:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD * , RATE*AMOUNT&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop table &lt;SPAN style="font-size: 13.3333px;"&gt;Table1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Aug 2017 11:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-task/m-p/1383447#M421408</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-08-25T11:00:56Z</dc:date>
    </item>
  </channel>
</rss>

