<?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 Null value causing problems in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Null-value-causing-problems/m-p/239369#M90000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that is dividing $(vFcstMonths) into null which causes an error. If you want to assign different values to vFcst_Invoices depending on the condition, you may try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET vFcst_Invoices=if(isnull($(Invoice_Every)),0,round($(vFcstMonths)/$(vInvoiced_Every)));&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;So when $(Invoice_Every) gets a null value, vFcst_Invoices will take 0, otherwise, round value. Is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2009 19:33:55 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2009-11-12T19:33:55Z</dc:date>
    <item>
      <title>Null value causing problems</title>
      <link>https://community.qlik.com/t5/QlikView/Null-value-causing-problems/m-p/239368#M89999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;Let&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; vFcst_Invoices =if(&lt;B&gt;&lt;I&gt;$(InvoiceEveryTest)&lt;/I&gt;&lt;/B&gt;=-1,0,round(&lt;B&gt;&lt;I&gt;$(vFcstMonths)&lt;/I&gt;&lt;/B&gt;/ &lt;B&gt;&lt;I&gt;$(vInvoiced_Every)&lt;/I&gt;&lt;/B&gt;));&lt;/P&gt;InvoiceEveryTest = isnull(vInvoiced_Every);&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When my code hits a record where vInvoiced_Every is a null it falls over.&lt;/P&gt;&lt;P&gt;When I look at the debugger it shows that the first part of the if : &lt;STRONG&gt;&lt;EM&gt;$(InvoiceEveryTest)&lt;/EM&gt;&lt;/STRONG&gt;=-1 is -1 = -1&lt;/P&gt;&lt;P&gt;but it falls over I can not see why it does not change vFcst_Invoices to 0 as it is supposed to.&lt;/P&gt;&lt;P&gt;Can you suggest how I can stop this problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2009 18:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-value-causing-problems/m-p/239368#M89999</guid>
      <dc:creator />
      <dc:date>2009-11-12T18:22:39Z</dc:date>
    </item>
    <item>
      <title>Null value causing problems</title>
      <link>https://community.qlik.com/t5/QlikView/Null-value-causing-problems/m-p/239369#M90000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that is dividing $(vFcstMonths) into null which causes an error. If you want to assign different values to vFcst_Invoices depending on the condition, you may try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET vFcst_Invoices=if(isnull($(Invoice_Every)),0,round($(vFcstMonths)/$(vInvoiced_Every)));&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;So when $(Invoice_Every) gets a null value, vFcst_Invoices will take 0, otherwise, round value. Is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2009 19:33:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-value-causing-problems/m-p/239369#M90000</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2009-11-12T19:33:55Z</dc:date>
    </item>
  </channel>
</rss>

