<?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: Calculation possible in Scripting? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692089#M667563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ThankYou I will try on the suggested and will get back to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Oct 2014 07:03:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-27T07:03:50Z</dc:date>
    <item>
      <title>Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692081#M667554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say i have following columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date1&amp;nbsp; Date2&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to write in script so that it will find me the difference of &lt;STRONG style=": ; color: #00ccff;"&gt;Value&lt;/STRONG&gt; of two different dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say &lt;/P&gt;&lt;P&gt;Date1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25/08/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;20/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&lt;/P&gt;&lt;P&gt;20/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/9/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so now script sould find out if the two dates are equal&lt;/P&gt;&lt;P&gt;then&amp;nbsp; (Value of (thatday+19 days) - (value on that day )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more clear when my script finds 1/8/2014&amp;nbsp; = 1/8/2014 then the output should be&lt;/P&gt;&lt;P&gt;( value on 20/08/2014) - ( value on 01/08/2014)&lt;/P&gt;&lt;P&gt;so O/P is 40 - 10 = 30... This will apply for other dates as well. Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Avi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 11:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692081#M667554</guid>
      <dc:creator />
      <dc:date>2014-10-24T11:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692082#M667556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can use the below.&lt;/P&gt;&lt;P&gt;if(Date1=Date2,sum(Value)-sum({&amp;lt;Date2={'$(=$(Date2-19))'}&amp;gt;}Value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 11:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692082#M667556</guid>
      <dc:creator />
      <dc:date>2014-10-24T11:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692083#M667557</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;Can you tell me why&amp;nbsp; you have used Sum function and also can you tell me the logic which you have given can be written in the script ? I want to implement in Script not in the front end &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 12:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692083#M667557</guid>
      <dc:creator />
      <dc:date>2014-10-24T12:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692084#M667558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a question about the intended logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value on (thatday + 19 days), should it be the value in the record with Date1 = Date 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, imagine I have a record for product A where Date 1 = 13/7/2014 and Date 2 = 13/7/2014. Now there are three possibilities for value of (thatday + 19 days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An easy solution could be with a mapping table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 12:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692084#M667558</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-24T12:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692085#M667559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be i might have put in wrong way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thatday&lt;/STRONG&gt; in my sentence means the Date1 where Date1 = date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i mean &lt;STRONG&gt;Thatday&lt;/STRONG&gt; is Date1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;To be more clear when my script finds 1/8/2014&amp;nbsp; = 1/8/2014 then the output should be&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;( value of when Date1 +19 = Date2 ) - ( value on 01/08/2014 = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1/8/2014&lt;/SPAN&gt; ).&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Date1 +19 is&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;20/08/2014&lt;/SPAN&gt;. There will be only one occurence where &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;20/08/2014= &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;20/08/2014(Date1 = Date2) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The value on 20/08/2014 is 40 and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The value on 01/08/2014 is 10 hence &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;O/P is 40 - 10 = 30.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Am i clear ?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Please let me know if anything is confusing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 12:16:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692085#M667559</guid>
      <dc:creator />
      <dc:date>2014-10-24T12:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692086#M667560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do understand that logic. What isn't clear to me is what happens if (thatday + 19 days) results in multiple possible values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revisit my example. Imagine I add a record at the beginning of your table like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;13/7/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/7/2014&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clearly Date 1 = Date 2, so your expression applies. But Thatday+19 results in 3 records for the same product with different values. What do we do? Sum all values (value = 55)? Take the one where Date 1 = Date 2 (value = 10)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 12:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692086#M667560</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-24T12:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692087#M667561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There will be only one occurence where Date1 = Date2 for a specific date. For a combination of Date1, Date2, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;period, Product &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So i wont be having data like Date1 = Date2 for 3 times for a specific date for a combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;13/7/2014 = 13/7/2014 occurence will be only once for the combination of&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;13/7/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/7/2014&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;There can be another line where &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;13/7/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/7/2014&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then this record should search for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1/08/2014&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1/08/2014&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;And give output of 100- 50 = 50 &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;It shouldnot search for the record of &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1/08/2014&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1/08/2014&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Because Product is A. The above record should be matched with &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp; Product&amp;nbsp; Value&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;13/07/2014&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/07/2014&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this has clarrified the doubt. If you still have any doubt please do let me know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 12:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692087#M667561</guid>
      <dc:creator />
      <dc:date>2014-10-24T12:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692088#M667562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about adding something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;MapDate2Value19DaysOn:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;MAPPING LOAD Date1 &amp;amp;'|' &amp;amp; period &amp;amp; '|' &amp;amp; Product as A, Value AS B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;RESIDENT YourOriginalFactsTable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;WHERE Date1 = Date2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;NewFactsTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;LOAD Date1, Date2, period, Product,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (Date1 &amp;lt;&amp;gt; Date2, Value,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; applymap('MapDate2Value19DaysOn', date(Date1 + 19) &amp;amp; '|' &amp;amp; period &amp;amp; '|' &amp;amp; Product, 0) - Value) AS Value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT YourOriginalFactsTable;&lt;/SPAN&gt;&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>Fri, 24 Oct 2014 13:43:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692088#M667562</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-24T13:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692089#M667563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ThankYou I will try on the suggested and will get back to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 07:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692089#M667563</guid>
      <dc:creator />
      <dc:date>2014-10-27T07:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692090#M667564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is working fine but&lt;/P&gt;&lt;P&gt;i am using one more logic where it is failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;MapDate2Value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;MAPPING LOAD Date1 &amp;amp;'|' &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;Date2&lt;/SPAN&gt; &amp;amp;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;'|'&lt;/SPAN&gt;&amp;amp; period &amp;amp; '|' &amp;amp; Product&amp;nbsp;&amp;nbsp; as C, Value AS D&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT YourOriginalFactsTable&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; font-style: inherit; font-weight: inherit; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;NewFactsTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;LOAD Date1, Date2, period, Product,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (Date1 &amp;lt;&amp;gt; Date2, Value,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; applymap('MapDate2Value', &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;Date1 &amp;amp;'|'&lt;/SPAN&gt; date(Date1 + 7) &amp;amp; '|' &amp;amp; period &amp;amp; '|' &amp;amp; Product, 0) - Value) AS Value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT YourOriginalFactsTable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;The above logic is for :&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;My Data&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1/8/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25/08/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Logic is maintained so that it should give 30-10 = 20 , 15-10 = 5&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Am i doing some wrong or what i am not understanding why it is not matching the records . The output I am getting is 0- Value(Because it is failing to match the recors)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IS there any limitation for Applymap?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 06:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692090#M667564</guid>
      <dc:creator />
      <dc:date>2014-10-28T06:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692091#M667565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two thoughts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In the NewFactsTable LOAD, you're missing an ampersand in the second parameter expression, between '|' and date()&lt;/LI&gt;&lt;LI&gt;If I read your new script correctly, you're trying to get hold of values in records that have Date2 = &lt;EM&gt;Date1 + 7&lt;/EM&gt; &lt;EM&gt;days&lt;/EM&gt;, right? For the example data, this will fail because there is no record where Date1 = 1/8/2014 and Date2 = 8/8/2014.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can obtain the required result if you reverse the logic for records with Date1 &amp;lt;&amp;gt; Date2. Do not keep Value-as-is, but calculate the new value as follows: &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;Value&lt;/SPAN&gt; - &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;applymap('MapDate2Value', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;Date1 &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;&amp;amp; '|' &amp;amp; period &amp;amp; '|' &amp;amp; Product, 0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Or with the complete context:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;MapDate2Value19DaysOn:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;MAPPING LOAD Date1 &amp;amp;'|' &amp;amp; period &amp;amp; '|' &amp;amp; Product as A, Value AS B&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT YourOriginalFactsTable&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;WHERE Date1 = Date2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;NewFactsTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;LOAD Date1, Date2, period, Product,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (Date1 &amp;lt;&amp;gt; Date2, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/SPAN&gt; - &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;applymap('MapDate2Value', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;Date1 &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 11px;"&gt;&amp;amp; '|' &amp;amp; period &amp;amp; '|' &amp;amp; Product, 0)&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; applymap('MapDate2Value19DaysOn', date(Date1 + 19) &amp;amp; '|' &amp;amp; period &amp;amp; '|' &amp;amp; Product, 0) - Value) AS Value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;RESIDENT YourOriginalFactsTable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&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, 28 Oct 2014 11:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692091#M667565</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-28T11:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation possible in Scripting?</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692092#M667566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the issue.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;It is working fine when did some format to the dates. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support and the help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 06:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-possible-in-Scripting/m-p/692092#M667566</guid>
      <dc:creator />
      <dc:date>2014-10-29T06:29:12Z</dc:date>
    </item>
  </channel>
</rss>

