<?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: How do I add a rank field in a load script statement? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401592#M149430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this should do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;Load TechArea2 , count(DISTINCT [Sl. No]) as Count&lt;/P&gt;&lt;P&gt;Resident ABC &lt;/P&gt;&lt;P&gt;Group by TechArea2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;load TechArea2, Count, rowno() as Rank&lt;/P&gt;&lt;P&gt;resident T1 order by Count desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table T1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2013 10:32:22 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-01-08T10:32:22Z</dc:date>
    <item>
      <title>How do I add a rank field in a load script statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401591#M149429</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;&lt;/P&gt;&lt;P&gt;I am using the code below to derive a Count field. Is it possible to add a rank for each TechArea2 as a seperate field based on the Count?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load TechArea2 , count(DISTINCT [Sl. No]) as Count&lt;/P&gt;&lt;P&gt;Resident ABC&lt;/P&gt;&lt;P&gt;Group by TechArea2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I want something like for the TechArea2 with the highest count the rank would be 1, then 2,3,4... and so on. I had used a rank() function in the chart but I have to derive this field in the load statemnet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please suggest anything?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 22:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401591#M149429</guid>
      <dc:creator />
      <dc:date>2013-01-07T22:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a rank field in a load script statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401592#M149430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this should do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;Load TechArea2 , count(DISTINCT [Sl. No]) as Count&lt;/P&gt;&lt;P&gt;Resident ABC &lt;/P&gt;&lt;P&gt;Group by TechArea2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;load TechArea2, Count, rowno() as Rank&lt;/P&gt;&lt;P&gt;resident T1 order by Count desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table T1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 10:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401592#M149430</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-08T10:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a rank field in a load script statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401593#M149431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert. that was a nice trick. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 17:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-add-a-rank-field-in-a-load-script-statement/m-p/401593#M149431</guid>
      <dc:creator />
      <dc:date>2013-01-08T17:42:10Z</dc:date>
    </item>
  </channel>
</rss>

