<?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: Performance question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929584#M321456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conditional expression would perform best, but as you hinted, may be difficult to maintain with a lot of objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a variable to select the expression will give you both performance and maintainability. Define a variable "mycalc" as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;if(GetSelectedCount(FieldA])&amp;gt;0 , 'sum(FieldB)',&amp;nbsp; 'sum(FieldC)')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Note the equal sign and he quotes around the expressions. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Then code the chart expression as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;$(mycalc)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2015 15:31:56 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2015-09-24T15:31:56Z</dc:date>
    <item>
      <title>Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929581#M321453</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;I have to create a whole app that is going to calculate something when a field selection is A and something else when the field selection is B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is better solution from performance scope?&lt;/P&gt;&lt;P&gt;1. Create one expression to every single object that use this logic &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if(GetSelectedCount(FieldA])&amp;gt;0 , sum(FieldB),&amp;nbsp; sum(FieldC))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Or else create two separate expressions with condition on expession?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep in mind that I have to do that on every single object in the app and there are really a lot of objects (which are using conditional show on object).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleased for your advise,&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 07:49:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929581#M321453</guid>
      <dc:creator>eleni_theodorid</dc:creator>
      <dc:date>2015-09-24T07:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929582#M321454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about doing this condition in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929582#M321454</guid>
      <dc:creator />
      <dc:date>2015-09-24T15:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929583#M321455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has to be working dynamically and be responsive to the selections...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929583#M321455</guid>
      <dc:creator>eleni_theodorid</dc:creator>
      <dc:date>2015-09-24T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929584#M321456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conditional expression would perform best, but as you hinted, may be difficult to maintain with a lot of objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a variable to select the expression will give you both performance and maintainability. Define a variable "mycalc" as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;if(GetSelectedCount(FieldA])&amp;gt;0 , 'sum(FieldB)',&amp;nbsp; 'sum(FieldC)')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Note the equal sign and he quotes around the expressions. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Then code the chart expression as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;$(mycalc)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929584#M321456</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-09-24T15:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929585#M321457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A dynamic expression directly via a table and a link to the selection field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-09-24 #1.PNG" class="jive-image image-1" src="/legacyfs/online/99980_2015-09-24 #1.PNG" style="height: 465px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929585#M321457</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-24T15:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929586#M321458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will testyour suggestions out and I will let you know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 10:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929586#M321458</guid>
      <dc:creator>eleni_theodorid</dc:creator>
      <dc:date>2015-09-25T10:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929587#M321459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that Petter's solution has one additional advantage that others may not have: you can make your Expression list configurable using an external file (e.g. an Excel file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW Thanks Petter, the INLINE delimiter trick is something new I learned from your script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 10:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-question/m-p/929587#M321459</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-09-25T10:50:14Z</dc:date>
    </item>
  </channel>
</rss>

