<?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: Ranking in Backend in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2466978#M99292</link>
    <description>&lt;P&gt;The important thing to remember here is that you have to do two operations which you can do simultaneously but one of them has a restriction. The first operation to to sort the records the second is to figure out the rank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you load data you can use an "order by" clause but this clause only works on data that is loaded via a resident load.&lt;/P&gt;
&lt;P&gt;So no matter what you do this is going to have to be a two step process.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Load the data in RAM&lt;/LI&gt;
&lt;LI&gt;Sort and rank the data&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Temp:
Load * Inline [
Region,Sales
North,5000
South,1500
East,1200
West,1800
]

Ranked:
Load
   Region,
   Sales,
   RowNo() as Rank
Resident Temp
Order by Sales Desc;
Drop Table Temp;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the RowNo function provides an autonumber based on the sequence of the records in the resulting table.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 20:33:48 GMT</pubDate>
    <dc:creator>chriscammers</dc:creator>
    <dc:date>2024-07-01T20:33:48Z</dc:date>
    <item>
      <title>Ranking in Backend</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2466921#M99283</link>
      <description>&lt;P&gt;I need to rank this data in the table below in the backend. Can someone help?&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" style="height: 15.0pt; width: 48pt;"&gt;Region&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;North&lt;/TD&gt;
&lt;TD align="right"&gt;5000&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;South&lt;/TD&gt;
&lt;TD align="right"&gt;1500&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;East&lt;/TD&gt;
&lt;TD align="right"&gt;1200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;West&lt;/TD&gt;
&lt;TD align="right"&gt;1800&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired output&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" style="height: 15.0pt; width: 48pt;"&gt;Region&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Sales&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Rank&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;North&lt;/TD&gt;
&lt;TD align="right"&gt;5000&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;West&lt;/TD&gt;
&lt;TD align="right"&gt;1800&lt;/TD&gt;
&lt;TD align="right"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;South&lt;/TD&gt;
&lt;TD align="right"&gt;1500&lt;/TD&gt;
&lt;TD align="right"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" style="height: 15.0pt;"&gt;East&lt;/TD&gt;
&lt;TD align="right"&gt;1200&lt;/TD&gt;
&lt;TD align="right"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 15:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2466921#M99283</guid>
      <dc:creator>ushakumari1_</dc:creator>
      <dc:date>2024-07-01T15:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in Backend</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2466978#M99292</link>
      <description>&lt;P&gt;The important thing to remember here is that you have to do two operations which you can do simultaneously but one of them has a restriction. The first operation to to sort the records the second is to figure out the rank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you load data you can use an "order by" clause but this clause only works on data that is loaded via a resident load.&lt;/P&gt;
&lt;P&gt;So no matter what you do this is going to have to be a two step process.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Load the data in RAM&lt;/LI&gt;
&lt;LI&gt;Sort and rank the data&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Temp:
Load * Inline [
Region,Sales
North,5000
South,1500
East,1200
West,1800
]

Ranked:
Load
   Region,
   Sales,
   RowNo() as Rank
Resident Temp
Order by Sales Desc;
Drop Table Temp;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the RowNo function provides an autonumber based on the sequence of the records in the resulting table.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 20:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2466978#M99292</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2024-07-01T20:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in Backend</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2467032#M99293</link>
      <description>&lt;P&gt;The solution from &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14016"&gt;@chriscammers&lt;/a&gt;&amp;nbsp; should solve your issue as you described it.&lt;/P&gt;
&lt;P&gt;You could also have a look at the quite new&amp;nbsp;&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/WindowFunctions/WRank.htm" target="_self"&gt;WRank.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 05:04:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2467032#M99293</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-07-02T05:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in Backend</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2467269#M99320</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;Any idea when wRank was? Depending on how recent any idea if it has made it to Qlik Sense on Windows??&lt;/P&gt;
&lt;P&gt;I definitely would have suggested WRank had I known about it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have WRank on your version then to serve the partition function you can use Autonumber(Value,PartitionDimension) instead of Rowno().&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 13:47:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-Backend/m-p/2467269#M99320</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2024-07-02T13:47:39Z</dc:date>
    </item>
  </channel>
</rss>

