<?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: nested If statements (performance issue) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539045#M201444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think match can not use expression as a parameter.&lt;/P&gt;&lt;P&gt;And nested if conditions can only effect the time consuming when change selections but not the performance if the logic is correct.&amp;nbsp; But of course nested if can easily cause performance issue.&lt;/P&gt;&lt;P&gt;The if expression in your post can not be optimized further, but you can try some improvement for the whole dash:&lt;/P&gt;&lt;P&gt;1. Create some new fields for some if cases in the load script, which actually can make the calculation fast than using if in the dash.&lt;/P&gt;&lt;P&gt;2. Use SET variable for some if expressions which gonna be reused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Zhihong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jul 2016 12:30:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-07-22T12:30:31Z</dc:date>
    <item>
      <title>nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539039#M201438</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i'm working with nested if condition like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;= &lt;/SPAN&gt;if(&lt;SPAN style="font-size: 8pt;"&gt; value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;= 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Black&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ( value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;=.35, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rgb&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(240,0,0),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=.50, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Green&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rgb&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(227,187,28)&lt;BR /&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;is there a way i can write the same expression using pick and mactch function &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;i'm having some performance issues with my application reason is---- there are so many nested if statements &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;any suggestions of tweaks in expression for better performance help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 16:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539039#M201438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-18T16:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539040#M201439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the same expression is used in multiple places, i.e., if the range for "value" is same in many expressions, you could create a flag on the scripting side (using intervalmatch may be) and use the flag in the if condition. &lt;/P&gt;&lt;P&gt;I could be wrong but a numeric flag might help improve performance instead of checking for this condition... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 17:02:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539040#M201439</guid>
      <dc:creator>manas_bn</dc:creator>
      <dc:date>2013-09-18T17:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539041#M201440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Manas, the value here is just Sum(inventory).........no scope for creating a flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 17:18:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539041#M201440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-18T17:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539042#M201441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any sugesstions &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 14:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539042#M201441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-19T14:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539043#M201442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can optimize something like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Alt(value, 0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= 0, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Black&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &amp;lt;=.35, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;rgb&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(240,0,0),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;=.50, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Green&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;rgb&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(227,187,28)&lt;BR /&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 15:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539043#M201442</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-09-19T15:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539044#M201443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply ..but the expression still has 3 if condition i want them to be reduced............ because all my objects have multiple if conditions .....&lt;/P&gt;&lt;P&gt;so this just a sample expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my intial post&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/392820#392820"&gt;http://community.qlik.com/message/392820#392820&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks agian&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 15:17:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539044#M201443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-19T15:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: nested If statements (performance issue)</title>
      <link>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539045#M201444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think match can not use expression as a parameter.&lt;/P&gt;&lt;P&gt;And nested if conditions can only effect the time consuming when change selections but not the performance if the logic is correct.&amp;nbsp; But of course nested if can easily cause performance issue.&lt;/P&gt;&lt;P&gt;The if expression in your post can not be optimized further, but you can try some improvement for the whole dash:&lt;/P&gt;&lt;P&gt;1. Create some new fields for some if cases in the load script, which actually can make the calculation fast than using if in the dash.&lt;/P&gt;&lt;P&gt;2. Use SET variable for some if expressions which gonna be reused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Zhihong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 12:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-If-statements-performance-issue/m-p/539045#M201444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T12:30:31Z</dc:date>
    </item>
  </channel>
</rss>

