<?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: Create variable for ranked position in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720002#M671161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Value itself rank or you want to create rank based on value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 12:00:36 GMT</pubDate>
    <dc:creator>anbu1984</dc:creator>
    <dc:date>2014-09-17T12:00:36Z</dc:date>
    <item>
      <title>Create variable for ranked position</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720001#M671160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Name, Value&lt;/P&gt;&lt;P&gt;A, 10&lt;/P&gt;&lt;P&gt;B, 5&lt;/P&gt;&lt;P&gt;C, 3&lt;/P&gt;&lt;P&gt;D, 4&lt;/P&gt;&lt;P&gt;E, 4&lt;/P&gt;&lt;P&gt;F, 5&lt;/P&gt;&lt;P&gt;G, 7&lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a variable that returns the name of the 4th in the list when ranked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It can't be done on load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 11:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720001#M671160</guid>
      <dc:creator>Glenn_Renwick</dc:creator>
      <dc:date>2014-09-17T11:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create variable for ranked position</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720002#M671161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Value itself rank or you want to create rank based on value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720002#M671161</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-09-17T12:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create variable for ranked position</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720003#M671162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=FirstSortedValue(Name, Value, 4)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720003#M671162</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-09-17T12:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create variable for ranked position</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720004#M671163</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;Try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;In your example, there is no 4th rank. So I changed little bit.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Load&amp;nbsp; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;&lt;BR /&gt;Name, Value&lt;BR /&gt;A, 10&lt;BR /&gt;B, 5&lt;BR /&gt;C, 3&lt;BR /&gt;D, 4&lt;BR /&gt;E, 4&lt;BR /&gt;F, 6&lt;BR /&gt;G, 7&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;= MaxString&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rank&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) = 4,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720004#M671163</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2014-09-17T12:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create variable for ranked position</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720005#M671164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rank(Sum(Value), 4, 1), [Name]) = 4,&amp;nbsp; [Name]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using the option 4 in the rank function was key due to the values been the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 = Lowest rank on first row, then incremented by one for each row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:07:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variable-for-ranked-position/m-p/720005#M671164</guid>
      <dc:creator>Glenn_Renwick</dc:creator>
      <dc:date>2014-09-17T12:07:42Z</dc:date>
    </item>
  </channel>
</rss>

