<?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 How to make calculations in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-make-calculations-in-script/m-p/522571#M690205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the attached script to create Data_2013 loaded from 3 excel files. Each file contains the time worked in different periods (months) by each employee in different Tasks types (WK01, WK02, WK03 and WK04). The files also contains [Nominal Mwd], which is the nominal time for each employee in each period. Both the absolute and percentage (%) values for each Task type are available in the files. Percentages are related to [Nominal Mwd].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script creates the field Period, by defining the period corresponding to each month ('2013P01', '2013P02' and '2013P03'). Also some Quartils are defined by an IF condition, depending on the [WK01%+WK02%] values for each employee, compared with certain threshold levels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create an aditional calculation to contain the sum of the [WK01%+WK02%] values for the 3 periods divided by the sum of the Nominal Mwd for each employee. Using the script variables, the formula should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Prod_01 + Prod_02 + Prod_03) / (Nominal_P01 + Nominal_P02 + Nominal_P03)&amp;nbsp; For each employee&lt;/P&gt;&lt;P&gt;So if an employee worked 2, 3 and 5 days respectively in each month, and total Nominal Mwd is 20 for the 3 periods, the result for this employee along the 3 months is 50%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do this in the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Oct 2013 19:06:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-07T19:06:11Z</dc:date>
    <item>
      <title>How to make calculations in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-calculations-in-script/m-p/522571#M690205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the attached script to create Data_2013 loaded from 3 excel files. Each file contains the time worked in different periods (months) by each employee in different Tasks types (WK01, WK02, WK03 and WK04). The files also contains [Nominal Mwd], which is the nominal time for each employee in each period. Both the absolute and percentage (%) values for each Task type are available in the files. Percentages are related to [Nominal Mwd].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script creates the field Period, by defining the period corresponding to each month ('2013P01', '2013P02' and '2013P03'). Also some Quartils are defined by an IF condition, depending on the [WK01%+WK02%] values for each employee, compared with certain threshold levels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create an aditional calculation to contain the sum of the [WK01%+WK02%] values for the 3 periods divided by the sum of the Nominal Mwd for each employee. Using the script variables, the formula should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Prod_01 + Prod_02 + Prod_03) / (Nominal_P01 + Nominal_P02 + Nominal_P03)&amp;nbsp; For each employee&lt;/P&gt;&lt;P&gt;So if an employee worked 2, 3 and 5 days respectively in each month, and total Nominal Mwd is 20 for the 3 periods, the result for this employee along the 3 months is 50%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do this in the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 19:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-calculations-in-script/m-p/522571#M690205</guid>
      <dc:creator />
      <dc:date>2013-10-07T19:06:11Z</dc:date>
    </item>
  </channel>
</rss>

