<?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 Problems with Top function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164417#M37113</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you should use set analysis.&lt;/P&gt;&lt;P&gt;Create a variable that to set every time vPriority. in the sheet where there is the table open an inputbox and insert vPriority.&lt;/P&gt;&lt;P&gt;So from there you can set it as you want&lt;/P&gt;&lt;P&gt;in the expression that you use in the table write this&lt;/P&gt;&lt;P&gt;(${&amp;lt;Priority={vPriority}&amp;gt;}yourExpression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jan 2011 15:49:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-11T15:49:46Z</dc:date>
    <item>
      <title>Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164415#M37111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i'm trying to solve this problem : I have a table with many companies codes, each of them can have different customer codes.&lt;/P&gt;&lt;P&gt;Each contact code has got a priority.&lt;/P&gt;&lt;P&gt;I need to visualize for each company a number of customers set by an external variable (defined by a slider) based on the priority.&lt;/P&gt;&lt;P&gt;So if I set the variable of the customer with value 2, in the table below I need to view only customers B e C for company 1, customer X e Y for company 2, because they have priority higher than others.&lt;/P&gt;&lt;P&gt;Setting variable to 3, I'll view customers B, C and A for company 1, X, Y e Z for company 2. So on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking to do this with a TOP function using the variable as OFFSET of the function.&lt;/P&gt;&lt;P&gt;I'm not able to use TOP function grouping by company&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="304"&gt;&lt;COL width="115" /&gt;&lt;COL width="123" /&gt;&lt;COL width="66" /&gt;&lt;TBODY&gt;&lt;TR height="17"&gt;&lt;TD height="17" width="115"&gt;COMPANY CODE&lt;/TD&gt;&lt;TD width="123"&gt;CUSTOMER CODE&lt;/TD&gt;&lt;TD width="66"&gt;PRIORITY&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17"&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="height: 35px;" width="304"&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="height: 35px;" width="304"&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 15:28:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164415#M37111</guid>
      <dc:creator />
      <dc:date>2011-01-11T15:28:50Z</dc:date>
    </item>
    <item>
      <title>Re. :Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164416#M37112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to use it in a list box, you have to use this expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=if(PRIORITY&amp;lt;=vPriority,[CUSTOMER CODE])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;But why don't you select your values of PRIORITY ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 15:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164416#M37112</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2011-01-11T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164417#M37113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you should use set analysis.&lt;/P&gt;&lt;P&gt;Create a variable that to set every time vPriority. in the sheet where there is the table open an inputbox and insert vPriority.&lt;/P&gt;&lt;P&gt;So from there you can set it as you want&lt;/P&gt;&lt;P&gt;in the expression that you use in the table write this&lt;/P&gt;&lt;P&gt;(${&amp;lt;Priority={vPriority}&amp;gt;}yourExpression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 15:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164417#M37113</guid>
      <dc:creator />
      <dc:date>2011-01-11T15:49:46Z</dc:date>
    </item>
    <item>
      <title>Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164418#M37114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My problem is what I have to write in "yourExpression".&lt;/P&gt;&lt;P&gt;I had already defined a variable and a slider object setting it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not able to calculate the : "for each company show me only how many customer are set by the variable basing on their prirority".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if my explanation is very clear..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 15:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164418#M37114</guid>
      <dc:creator />
      <dc:date>2011-01-11T15:58:54Z</dc:date>
    </item>
    <item>
      <title>Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164419#M37115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry the correct expression format is this&lt;/P&gt;&lt;P&gt;(${&amp;lt;Priority={'$(vPriority)'}&amp;gt;}yourExpression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 16:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164419#M37115</guid>
      <dc:creator />
      <dc:date>2011-01-11T16:11:23Z</dc:date>
    </item>
    <item>
      <title>Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164420#M37116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in table dinension set Company and the expression is&lt;/P&gt;&lt;P&gt;count(${&amp;lt;Priority={'$(vPriority)'}&amp;gt;}Customer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 16:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164420#M37116</guid>
      <dc:creator />
      <dc:date>2011-01-11T16:26:31Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164421#M37117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want to do that, the correct expression is this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;count({$&amp;lt;Priority={"&amp;lt;=$(=vPriority)"}&amp;gt;} Distinct Customer)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 16:33:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164421#M37117</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2011-01-11T16:33:55Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164422#M37118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to be ok.&lt;/P&gt;&lt;P&gt;Your solution is completely different from what I had in mind..&lt;/P&gt;&lt;P&gt;Now I'm trying to show the row only if the expression you posted is different from zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 16:57:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164422#M37118</guid>
      <dc:creator />
      <dc:date>2011-01-11T16:57:31Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164423#M37119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4087.before.JPG"&gt;&lt;IMG alt="" border="0" height="183" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4087.before.JPG" width="626" /&gt;&lt;/A&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7217.after.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/7217.after.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression suggested by Martin Favier doesn't work completely correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at code company 1260392 in those example: in the first one (before.jpg) the variable of the priority is set to 5 and both the customers 1182050 and 1260392 are showed.&lt;/P&gt;&lt;P&gt;In the second image (after.jpg) the variable is set to 2 and the table doesn't show customer 1260392. Even if it has priority 3 I need it's showed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is that if I have only 2 customers, one with priority 2 and one with priority 4 and I set the variable to 2 I need to see also the customer with priority 4.&lt;/P&gt;&lt;P&gt;On the contrary, if have 3 customers, two with priority 2 and one with priority 4 and I set the variable to 2 I need to see only those customers with priority 2 because they have both greater priority than the customer with prior 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 11:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164423#M37119</guid>
      <dc:creator />
      <dc:date>2011-01-12T11:04:40Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Problems with Top function</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164424#M37120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 15:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-Top-function/m-p/164424#M37120</guid>
      <dc:creator />
      <dc:date>2011-01-12T15:24:22Z</dc:date>
    </item>
  </channel>
</rss>

