<?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 Calculation in the loading script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263765#M99187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that works also &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jul 2011 11:25:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-07-07T11:25:37Z</dc:date>
    <item>
      <title>Calculation in the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263761#M99183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probebly a very simple question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to make calculations in the loading script, but I stumble on fields without values.&lt;/P&gt;&lt;P&gt;Please take a look at the calculation in the script of the attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When there is no value in one of the fields the result of the calculation is empty, which imo is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I make this calculation? &lt;/P&gt;&lt;P&gt;Or is there an easy way to autogenarate '0' when there is no value in a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dennis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263761#M99183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-07T10:45:47Z</dc:date>
    </item>
    <item>
      <title>Calculation in the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263762#M99184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Dennis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; If(Not IsNull(Start),Start,0) + If(Not IsNull(Mutatie),Mutatie,0) as Calculation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:55:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263762#M99184</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-07-07T10:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation in the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263763#M99185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dennis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can go to the chart properties, Presentation tab, and set "0" as the Null Symbol instead of the "-" sign. However I don't think this is the best solution. Instead, checking that both fields in the script are not empty and, if they are, assign them a 0, would be harder to code but will return better results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;If(Len(Start) = 0, 0, Start) + If(Len(Mutatie) = 0, 0, Mutatie) AS Calculation&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you have to do this (or use the NullDisplay variable if your ODBC returns nulls) because the "+" operator returns null when one of the values is null. But the Sum() functions returns zero even when some values are null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small active_link" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 11:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263763#M99185</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-07-07T11:05:22Z</dc:date>
    </item>
    <item>
      <title>Calculation in the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263764#M99186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that works perfect! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 11:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263764#M99186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-07T11:23:38Z</dc:date>
    </item>
    <item>
      <title>Calculation in the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263765#M99187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that works also &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 11:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-in-the-loading-script/m-p/263765#M99187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-07T11:25:37Z</dc:date>
    </item>
  </channel>
</rss>

