<?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: Calculate expression if a field in the database is null in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238125#M855460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hey,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You can handle it in script and do not worry in expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14865806626014920" jivemacro_uid="_14865806626014920"&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;Product,&lt;/P&gt;
&lt;P&gt;Sales,&lt;/P&gt;
&lt;P&gt;IF(ISNULL(Sales),[sales estimated], 0) as [sales estimated]&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This will maintain value for sales estimated, only when Sales is null&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BR,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Kuba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2017 19:04:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-02-08T19:04:56Z</dc:date>
    <item>
      <title>Calculate expression if a field in the database is null</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238122#M855457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading a table from a database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 fields, product, sales and sales estimated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would like an expression of the sales estimated that on a row if sales is null then sum sales estimated if is not null then don´t do anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&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/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238122#M855457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate expression if a field in the database is null</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238123#M855458</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;You can create a flag in script like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Product,Sales,SalesEstimated,If(Isnull(Sales),1,0) as NullFlag From xyz;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in chart expression you can write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;NullFlag = {"0"}&amp;gt;}SalesEstimated)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this expression will consider only records which have value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 17:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238123#M855458</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-02-08T17:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate expression if a field in the database is null</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238124#M855459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OR even dont need set analysis expression :&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Simply Do : &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(NullFlag*SalesEstimated)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 19:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238124#M855459</guid>
      <dc:creator>jayanttibhe</dc:creator>
      <dc:date>2017-02-08T19:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate expression if a field in the database is null</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238125#M855460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hey,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You can handle it in script and do not worry in expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14865806626014920" jivemacro_uid="_14865806626014920"&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;Product,&lt;/P&gt;
&lt;P&gt;Sales,&lt;/P&gt;
&lt;P&gt;IF(ISNULL(Sales),[sales estimated], 0) as [sales estimated]&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This will maintain value for sales estimated, only when Sales is null&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BR,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Kuba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 19:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-expression-if-a-field-in-the-database-is-null/m-p/1238125#M855460</guid>
      <dc:creator />
      <dc:date>2017-02-08T19:04:56Z</dc:date>
    </item>
  </channel>
</rss>

