<?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: Set Analysis Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477948#M178515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it is not very helpful, but anyway...&lt;/P&gt;&lt;P&gt;Set expressions are evaluated per overall data rather than per chart dimensions.&amp;nbsp; Hence, using expressions with set not always works as desired.&amp;nbsp; In your case, it make sense to try expression with "if".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2013 17:44:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-08T17:44:24Z</dc:date>
    <item>
      <title>Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477947#M178514</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;Just wondered if anyone could give me any quick pointers into some trouble I am having with a formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested the below in a text box, with a product (sku_id) selected and obtained the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;sku_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"=rank(sum(purchase),sku_id)&amp;lt;=rec_count"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Association_type&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=-{''}&amp;gt;}sku_id)&lt;BR /&gt; /&lt;BR /&gt; Sum(rec_count) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I put the same formula into a table (Where sku_id is a dimension) it does not seem to work. Having played around and made changes it would appear that the problem lies with the “rec_count” contained within the Rank expression in the set analysis, it does not appear to work when in the table (I have substituted a number and got the correct result) so it would appear the value is not coming through?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rec_count is a data field containing a number (Linked 1:1 with sku_id) and is required for the calculation. (i.e for a given product the top x to include for the count can be different)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 14:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477947#M178514</guid>
      <dc:creator />
      <dc:date>2013-08-08T14:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477948#M178515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it is not very helpful, but anyway...&lt;/P&gt;&lt;P&gt;Set expressions are evaluated per overall data rather than per chart dimensions.&amp;nbsp; Hence, using expressions with set not always works as desired.&amp;nbsp; In your case, it make sense to try expression with "if".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 17:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477948#M178515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-08T17:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477949#M178516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use TOTAL key word while calculating the rank ... or try to use first sorted value function either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 18:07:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Problem/m-p/477949#M178516</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-08-08T18:07:58Z</dc:date>
    </item>
  </channel>
</rss>

