<?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: Rank() within a specific dimension when you have multiple ones in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204975#M462218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It might be easier if you are able to share a sample and let us know the expected output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 May 2018 12:04:02 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-05-04T12:04:02Z</dc:date>
    <item>
      <title>Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204969#M462212</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 am new to Qlik and trying to solve the following issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with two dimensions, one with the entry's unique ID, and one with a category, as in the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139860_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to create a new column with a ranking of 'Score' - my measure - per category:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/139861_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the expression&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Rank(Score)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I get a column of ones, as the command takes the most granular dimension (Unique ID) as the default one. If I use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Rank(TOTAL Score)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It obviously returns a ranking regardless of all the dimensions. By reading the documentation and similar questions asked by other users I reckon that it should be possible to specify which dimension to use for TOTAL, with the following syntax:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Rank(TOTAL &amp;lt;Category&amp;gt; Score)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet, the formula returns an error and only null column values. I've tried different syntax, use of brackets but I still cannot grasp what I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that I cannot create the ranking column when loading the data.&lt;/P&gt;&lt;P&gt;I would immensely appreciate if someone were so kind to help on this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 12:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204969#M462212</guid>
      <dc:creator />
      <dc:date>2016-10-06T12:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204970#M462213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(Rank(Score), [Unique ID], Category)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 17:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204970#M462213</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-06T17:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204971#M462214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, the expression should be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(Rank(Score),Category, [Unique ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139896_Capture.PNG" style="height: 231px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 17:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204971#M462214</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-06T17:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204972#M462215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After some additional playing around more with the Aggr function, I found the solution: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;STRONG&gt;=aggr(rank(sum(Score)), Category, UniqueID)&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;Thank you again Sunny, without your lead I would have not solved it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 08:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204972#M462215</guid>
      <dc:creator />
      <dc:date>2016-10-07T08:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204973#M462216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome &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;I am glad you found what you were looking for. Please close this thread by marking correct and helpful responses.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 15:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204973#M462216</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T15:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204974#M462217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have similar type of problem, and to my understanding this function might solve that also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have buttons where user can choose the dimension and measure on the graphs. On this one graph, I have also time (months) as an dimension, in addition to what user chooses. My problem is that some of these dimensions have too many unique values, so the line graph gets extremely messy. I would like to show for example top 5 for whatever the user chooses for the dimension. The problem is that the top 5 is not calculated on the measure of that graph but, another measure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimension has the following syntax:&amp;nbsp; pick($(VTable),Dim1,Dim2,Dim3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the measure of the graph:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(VVolumeDummy = 1, sum({&amp;lt;DEAL={'Won'}&amp;gt;} Turnover) /&amp;nbsp; sum({&amp;lt;DEAL={'Won','Lost'}&amp;gt;} Turnover),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;DEAL={'Won'}&amp;gt;} ID) /&amp;nbsp; count({&amp;lt;DEAL={'Won','Lost'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the measure by which I would like to show the top 5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(VVolumeDummy = 1, sum({&amp;lt;DEAL={'Won'}&amp;gt;} Turnover),count({&amp;lt;DEAL={'Won'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do a calculated dimension somehow with that similar kind of syntax/logic? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;Matti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 11:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204974#M462217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-04T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rank() within a specific dimension when you have multiple ones</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204975#M462218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It might be easier if you are able to share a sample and let us know the expected output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 12:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-within-a-specific-dimension-when-you-have-multiple-ones/m-p/1204975#M462218</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-04T12:04:02Z</dc:date>
    </item>
  </channel>
</rss>

