<?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 % Calculations in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/1197692#M884073</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;I have a calculation in my load script that Stephan helped me with, thank you again Stephan. I have been layering in another calculation on top of the original FTE calculation in my UI, but it makes my UI very slow. I would like to move the calculation to the load script, but I am having trouble getting the calculation to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically want to divide the count of worker cancellations by FTE to give me a ratio of worker cancellations to workers and then do the same for sites. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Calculation in Load Script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTECalculations:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;UID,&lt;/P&gt;&lt;P&gt;FTEMonth, &lt;/P&gt;&lt;P&gt;DaysWorked/DaysInMonth as FTE;&lt;/P&gt;&lt;P&gt;MonthName(OADate) as FTEMonth, &lt;/P&gt;&lt;P&gt;Count(DISTINCT OADate) as DaysWorked,&lt;/P&gt;&lt;P&gt;Only(Day(MonthEnd(OADate))) as DaysInMonth&lt;/P&gt;&lt;P&gt;From OAMaster.qvd (qvd)&lt;/P&gt;&lt;P&gt;Group by UID, MonthName(OADate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Additional Field for Calculation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (TOACalculations)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;UID,&lt;/P&gt;&lt;P&gt;TypeDescription,&lt;/P&gt;&lt;P&gt;if(CancelledByWorkerDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',CancelledByWorkerDate) as WorkerCancellationDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(CancelledByWorkerDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',1,0) as WorkerCancellationFlag,&lt;/P&gt;&lt;P&gt;if(CancelledBySiteDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',CancelledBySiteDate) as SiteCancellationDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(CancelledBySiteDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',1,0) as SiteCancellationFlag&lt;/P&gt;&lt;P&gt;Resident Status;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help and insight in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>% Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/1197692#M884073</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;I have a calculation in my load script that Stephan helped me with, thank you again Stephan. I have been layering in another calculation on top of the original FTE calculation in my UI, but it makes my UI very slow. I would like to move the calculation to the load script, but I am having trouble getting the calculation to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically want to divide the count of worker cancellations by FTE to give me a ratio of worker cancellations to workers and then do the same for sites. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Calculation in Load Script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTECalculations:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;UID,&lt;/P&gt;&lt;P&gt;FTEMonth, &lt;/P&gt;&lt;P&gt;DaysWorked/DaysInMonth as FTE;&lt;/P&gt;&lt;P&gt;MonthName(OADate) as FTEMonth, &lt;/P&gt;&lt;P&gt;Count(DISTINCT OADate) as DaysWorked,&lt;/P&gt;&lt;P&gt;Only(Day(MonthEnd(OADate))) as DaysInMonth&lt;/P&gt;&lt;P&gt;From OAMaster.qvd (qvd)&lt;/P&gt;&lt;P&gt;Group by UID, MonthName(OADate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Additional Field for Calculation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (TOACalculations)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;UID,&lt;/P&gt;&lt;P&gt;TypeDescription,&lt;/P&gt;&lt;P&gt;if(CancelledByWorkerDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',CancelledByWorkerDate) as WorkerCancellationDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(CancelledByWorkerDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',1,0) as WorkerCancellationFlag,&lt;/P&gt;&lt;P&gt;if(CancelledBySiteDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',CancelledBySiteDate) as SiteCancellationDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(CancelledBySiteDate&amp;lt;&amp;gt; Null() and TypeDescription='Cancellation',1,0) as SiteCancellationFlag&lt;/P&gt;&lt;P&gt;Resident Status;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help and insight in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/1197692#M884073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: % Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/1197693#M884074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up bringing in the FTEMonth into a canonical calendar. The issue that I am having now is that the FTE calculation is not correct if I use month year dimension from the canonical calendar, but correct if I use the FTEMonth dimension from the FTECalculations table.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 23:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/1197693#M884074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-06T23:44:39Z</dc:date>
    </item>
  </channel>
</rss>

