<?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: Qlik Sense Calculating Variables in an 'IF' Statement in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374073#M31022</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;It is not the variable which is creating issue. It is the if statement which is giving you the performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must use the different approach for your expression.&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, 09 Aug 2017 17:56:50 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2017-08-09T17:56:50Z</dc:date>
    <item>
      <title>Qlik Sense Calculating Variables in an 'IF' Statement</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374072#M31021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone, i have an If statement on the fly on a Qlik sense object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(condition a=true, $(vVariable1),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;SPAN style="font-size: 13.3333px;"&gt;condition b=true, $(vVariable2),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt; if(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;condition c=true, $(vVariable3),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt; if(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;condition d=true, $(vVariable4),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(.......................................................................))))...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Now naturally&amp;nbsp; all the variables 1-4 will evaluate first then the If conditions however what i want to do is only evaluate the variable if the condition is met first.. My actual script contains over 30 nested IF's and on each click on a filter evaluates all the variables and then the condition leading to extremely slow performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Has anyone identified a way to tackle this in a simple way &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 17:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374072#M31021</guid>
      <dc:creator>nam</dc:creator>
      <dc:date>2017-08-09T17:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Calculating Variables in an 'IF' Statement</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374073#M31022</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;It is not the variable which is creating issue. It is the if statement which is giving you the performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must use the different approach for your expression.&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, 09 Aug 2017 17:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374073#M31022</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-09T17:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Calculating Variables in an 'IF' Statement</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374074#M31023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Naweed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you considered taking care of more of these conditions in the data model? Say with more flags, or more of the combinations already predetermined?&lt;/P&gt;&lt;P&gt;When my interface conditional statements become overwhelming, I think push it back to the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Patrick &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 19:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374074#M31023</guid>
      <dc:creator>duffman1968</dc:creator>
      <dc:date>2017-08-09T19:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Calculating Variables in an 'IF' Statement</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374075#M31024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes i have, the purpose behind this is on the fly dynamic measures and dimension selection in a pivot table from data island list selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes the ideal way would be to remove the if statement and create a single table with changing expression, but im purposely trying to achieve everything in a single Pivot table. So here i basically want to somehow not calculate the variables until a condition is met on the fly to boost performance. what iv shown above is only a small snipped of the if statement each variable 1-4 has inner variables with complex calculation . Im trying to show the possibility of achieving this on the fly without the use of any extensions or plugins. The concept now works but its slow &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 08:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Calculating-Variables-in-an-IF-Statement/m-p/1374075#M31024</guid>
      <dc:creator>nam</dc:creator>
      <dc:date>2017-08-10T08:17:54Z</dc:date>
    </item>
  </channel>
</rss>

