<?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: Optimized way to write if(expression=0,Null(), expresssion) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2421089#M95682</link>
    <description>&lt;P&gt;expression is simple and has few filters in set analysis.&lt;BR /&gt;example: I have expressions stored in variable&lt;/P&gt;
&lt;P&gt;eTotalSalesCY= sum({&amp;lt;Year={'2023'}, Dept={'IT'}&amp;gt;}Sales)&lt;/P&gt;
&lt;P&gt;I think when I write&amp;nbsp;eTotalSalesCY in the expression like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(eTotalSalesCY =0,Null(), eTotalSalesCY ), it will evaluate&amp;nbsp;eTotalSalesCY&amp;nbsp; twice, I may be wrong but I'm trying to find the most optimized way to write this.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2024 10:09:30 GMT</pubDate>
    <dc:creator>AnasAbbasi94</dc:creator>
    <dc:date>2024-02-20T10:09:30Z</dc:date>
    <item>
      <title>Optimized way to write if(expression=0,Null(), expresssion)</title>
      <link>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2420159#M95603</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to find an optimized way to write an expression. The current requirement is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(expression=0,Null(), expresssion)&lt;/P&gt;
&lt;P&gt;But I believe if the expression is too heavy(in many case), it may be time and resource consuming when several expressions like this will be together in a straight table. I want to reduce the calculation time.&lt;/P&gt;
&lt;P&gt;There is an inbuilt function i.e. Alt but it does opposite of what I need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hence, I'm here for help. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;LI-PRODUCT title="QlikView" id="qlikView"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2420159#M95603</guid>
      <dc:creator>AnasAbbasi94</dc:creator>
      <dc:date>2024-11-15T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized way to write if(expression=0,Null(), expresssion)</title>
      <link>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2420241#M95611</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/194996"&gt;@AnasAbbasi94&lt;/a&gt;&amp;nbsp;Hello, what is the&amp;nbsp;&lt;SPAN&gt;expresssion conditon looks like?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 20:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2420241#M95611</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2024-02-16T20:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized way to write if(expression=0,Null(), expresssion)</title>
      <link>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2421089#M95682</link>
      <description>&lt;P&gt;expression is simple and has few filters in set analysis.&lt;BR /&gt;example: I have expressions stored in variable&lt;/P&gt;
&lt;P&gt;eTotalSalesCY= sum({&amp;lt;Year={'2023'}, Dept={'IT'}&amp;gt;}Sales)&lt;/P&gt;
&lt;P&gt;I think when I write&amp;nbsp;eTotalSalesCY in the expression like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(eTotalSalesCY =0,Null(), eTotalSalesCY ), it will evaluate&amp;nbsp;eTotalSalesCY&amp;nbsp; twice, I may be wrong but I'm trying to find the most optimized way to write this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 10:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2421089#M95682</guid>
      <dc:creator>AnasAbbasi94</dc:creator>
      <dc:date>2024-02-20T10:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized way to write if(expression=0,Null(), expresssion)</title>
      <link>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2421108#M95683</link>
      <description>&lt;P&gt;I believe what you're using is already the best way to go about it, assuming having a null value is required. I would suggest reconsidering whether a null() is required rather than a 0 in the first place, and I'd also suggest investigating your data model and setup if a basic sum with a set creates a performance issue. &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 10:33:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimized-way-to-write-if-expression-0-Null-expresssion/m-p/2421108#M95683</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2024-02-20T10:33:38Z</dc:date>
    </item>
  </channel>
</rss>

