<?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: Best way to handle nested ifs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Best-way-to-handle-nested-ifs/m-p/655899#M239511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. In first place, you should take a look in your data model. QVW Size? No of tables? Table structure? do you have synthetic keys?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In second place, some times you can put these indicators in a table, or just in text boxes, so for know how is the best way, you should send a reduced copy of the qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, you are making calculations and comparations in every&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; a/b &amp;gt; 1, where you could do just comparations with&amp;nbsp; if&amp;nbsp; a&amp;gt;b. Also, always thin about doning less calculus as possible. Look for another version for your first exp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Light:&lt;/P&gt;&lt;P&gt;if (&amp;nbsp; $(var1) &amp;gt; $(var2), [green],&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ( $var1) &amp;gt; $(var2) * $(Limit), [yellow], [red]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you have in the variables? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing to do is don't use images. So, if you want, send a reduced sample to know the best solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2014 16:50:02 GMT</pubDate>
    <dc:creator>sebastiandperei</dc:creator>
    <dc:date>2014-07-25T16:50:02Z</dc:date>
    <item>
      <title>Best way to handle nested ifs</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-handle-nested-ifs/m-p/655898#M239510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;We have an application with over 100 millions of records with four main subjects and the report sheet has several tables with delta (up/down arrows)&amp;nbsp; indicators and light indicators (red, green or yellow according to the conditions).&amp;nbsp; We are facing performance issues, it takes over 30 seconds to load all the six tables with 24 expressions, so it needs to be faster. I was reading about the performance tips in the community, and many mention the nested ifs So, I want to check the best way to evaluate this type of indicators. Right now, this is the structure of this indicators:&lt;/P&gt;&lt;P&gt;Light Indicator:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;if( $(variable1)/$(variable2) &amp;gt; 1, [green color image],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($(variable1)/$(variable2) &amp;lt; 1 and $(variable1)/$(variable2) &amp;gt; $(vLimit), [yellow color image],[red color image]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delta Indicator:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;if( $(variable1)/$(variable2) &amp;gt; 1, [up arrow], [down arrow]&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #0000ff; font-size: 10pt; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and in the text color:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;if( $(variable1)/$(variable2) &amp;gt; 1, [green color],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($(variable1)/$(variable2) &amp;lt; 1 and $(variable1)/$(variable2) &amp;gt; $(vLimit), [yellow color],[red color]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way?&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-handle-nested-ifs/m-p/655898#M239510</guid>
      <dc:creator />
      <dc:date>2014-07-25T16:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to handle nested ifs</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-handle-nested-ifs/m-p/655899#M239511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. In first place, you should take a look in your data model. QVW Size? No of tables? Table structure? do you have synthetic keys?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In second place, some times you can put these indicators in a table, or just in text boxes, so for know how is the best way, you should send a reduced copy of the qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, you are making calculations and comparations in every&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; a/b &amp;gt; 1, where you could do just comparations with&amp;nbsp; if&amp;nbsp; a&amp;gt;b. Also, always thin about doning less calculus as possible. Look for another version for your first exp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Light:&lt;/P&gt;&lt;P&gt;if (&amp;nbsp; $(var1) &amp;gt; $(var2), [green],&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ( $var1) &amp;gt; $(var2) * $(Limit), [yellow], [red]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you have in the variables? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing to do is don't use images. So, if you want, send a reduced sample to know the best solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 16:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-handle-nested-ifs/m-p/655899#M239511</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2014-07-25T16:50:02Z</dc:date>
    </item>
  </channel>
</rss>

