<?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 Improving expression for Performance reasons in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310727#M498756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;I have a query I am hoping someone can help me out with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart in an application that has multiple expressions for different measures. I have about 7 expressions and the content of the expressions is pretty similar to the script below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;STAT = {'CNS'}, LAST_DATE={'Y'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PRODUCT = {'C', 'L'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AREA ={'Usa', 'China', 'England', 'Wales', 'Italy'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;gt;} VALUE)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have is that the chart is really slow because of the excess use of set analysis and multiple expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please kindly suggest a way for me to do something with the expressions or possibly move some logic into the script to improve the performance of this chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jun 2011 12:40:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-22T12:40:02Z</dc:date>
    <item>
      <title>Improving expression for Performance reasons</title>
      <link>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310727#M498756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;I have a query I am hoping someone can help me out with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart in an application that has multiple expressions for different measures. I have about 7 expressions and the content of the expressions is pretty similar to the script below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;STAT = {'CNS'}, LAST_DATE={'Y'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PRODUCT = {'C', 'L'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AREA ={'Usa', 'China', 'England', 'Wales', 'Italy'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;gt;} VALUE)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have is that the chart is really slow because of the excess use of set analysis and multiple expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please kindly suggest a way for me to do something with the expressions or possibly move some logic into the script to improve the performance of this chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 12:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310727#M498756</guid>
      <dc:creator />
      <dc:date>2011-06-22T12:40:02Z</dc:date>
    </item>
    <item>
      <title>Improving expression for Performance reasons</title>
      <link>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310728#M498757</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;if your selections are static try to use if-then-else:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(STAT = 'CNS' And &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LAST_DATE='Y' And &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Match(PRODUCT , 'C', 'L') And &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Match(AREA ,'Usa', 'China', 'England', 'Wales', 'Italy'),&lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VALUE)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Greetings from Munich&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 13:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310728#M498757</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-06-22T13:01:20Z</dc:date>
    </item>
    <item>
      <title>Improving expression for Performance reasons</title>
      <link>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310729#M498758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Brenner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the selections are not static and so for one expression, I could have for Area (Japan, Turkey, Mexico) and for another expression I could have (Brazil, Scotland, Canada), so the sum if statement does not work as expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 13:28:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310729#M498758</guid>
      <dc:creator />
      <dc:date>2011-06-22T13:28:40Z</dc:date>
    </item>
    <item>
      <title>Improving expression for Performance reasons</title>
      <link>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310730#M498759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, zebadguy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if only AREA is changing by selection you can combine like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;AREA ={$(varArea)}&amp;gt;} &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(STAT = 'CNS' And &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LAST_DATE='Y' And &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Match(PRODUCT , 'C', 'L')&lt;/STRONG&gt;&lt;STRONG&gt;, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VALUE)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and the variable varArea is defined with the function concat() for the actual selection., like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Chr(39)&amp;amp;Concat(AREA,Chr(39)&amp;amp;','&amp;amp;Chr(39))&amp;amp;Chr(39) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chr(39) = Apostroph&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings from Martina from Munich&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 13:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improving-expression-for-Performance-reasons/m-p/310730#M498759</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-06-22T13:59:47Z</dc:date>
    </item>
  </channel>
</rss>

