<?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 Maybe Set Analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270458#M101425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem where an expression takes a long time to refresh when new selections are made. I have tried converting the expression with Set Analysis, but for some reason it does not give me a result. The expression is: Count(Distinct(IF(Trim(field1) = 'Some Condition', field2))). My second part of the question is: Is it Best Practise to use Set Analysis to speed up expression calculations or should I rather be doing the "complex" calculations in the load script?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Sep 2011 01:54:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-19T01:54:34Z</dc:date>
    <item>
      <title>Maybe Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270458#M101425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem where an expression takes a long time to refresh when new selections are made. I have tried converting the expression with Set Analysis, but for some reason it does not give me a result. The expression is: Count(Distinct(IF(Trim(field1) = 'Some Condition', field2))). My second part of the question is: Is it Best Practise to use Set Analysis to speed up expression calculations or should I rather be doing the "complex" calculations in the load script?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 01:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270458#M101425</guid>
      <dc:creator />
      <dc:date>2011-09-19T01:54:34Z</dc:date>
    </item>
    <item>
      <title>Maybe Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270459#M101426</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let me tell you one thing, that Count() function is a time intensive, meaning it takes more time to execute then other functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In you case it takes much longer time cause with count you have if statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The equivelent set expression for your expression is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count({&amp;lt;Field1 = {"Some Condition"}&amp;gt;}distinct Field2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This may take time too... as its a count function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The best practise is to put an extra field to table. say '1'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now you can use the sum function on these field, and get count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 05:06:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270459#M101426</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-09-19T05:06:54Z</dc:date>
    </item>
    <item>
      <title>Maybe Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270460#M101427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Kaushik - That was a good tip creating a new field: i.e. 1 AS [myCounter] and doing a Sum on it rather than using the Count clause. I also did the Trim part in the back-end and the refresh rate is now milli-seconds again apposed to 30 seconds - as it was when all the calculations and the Count was done in the expression on the front-end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 01:24:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270460#M101427</guid>
      <dc:creator />
      <dc:date>2011-09-21T01:24:06Z</dc:date>
    </item>
    <item>
      <title>Maybe Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270461#M101428</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thats good. From next time you wont get performance issue for sure - as you got the solution for that. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&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, 21 Sep 2011 04:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Maybe-Set-Analysis/m-p/270461#M101428</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-09-21T04:53:15Z</dc:date>
    </item>
  </channel>
</rss>

