<?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 Rank (Sum) to scripts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725658#M592001</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to convert this chart expression into script expression:&lt;/P&gt;&lt;P&gt;Rank(sum({&amp;lt;ID&amp;gt;} Score))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any leads?&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:22:07 GMT</pubDate>
    <dc:creator>AngieO2019</dc:creator>
    <dc:date>2024-11-16T00:22:07Z</dc:date>
    <item>
      <title>Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725658#M592001</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to convert this chart expression into script expression:&lt;/P&gt;&lt;P&gt;Rank(sum({&amp;lt;ID&amp;gt;} Score))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any leads?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725658#M592001</guid>
      <dc:creator>AngieO2019</dc:creator>
      <dc:date>2024-11-16T00:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725660#M592002</link>
      <description>&lt;P&gt;can you share a sample data and the expected output ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725660#M592002</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-07-07T10:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725669#M592003</link>
      <description>&lt;P&gt;Hi, I can only provide this sample data.&lt;/P&gt;&lt;P&gt;The premise is that, depending on the percentage that the user will input on the input box, all IDs and Scores will be tagged as "Included".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the formula that I used on the chart in QlikView is:&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;aggr(&lt;/P&gt;&lt;P&gt;(count({&amp;lt;ID&amp;gt;}Distinct Total ID) - Rank(sum({&amp;lt;ID&amp;gt;} Score))) / (count({&amp;lt;ID&amp;gt;}Distinct Total ID)-1)&lt;/P&gt;&lt;P&gt;,ID)&lt;BR /&gt;&amp;gt;= (1 - ($(Percentage)))&lt;BR /&gt;&lt;BR /&gt;, Dual('Include',1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to translate the other functions in scripts, however, I'm having issues with the Rank(Sum) part...&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 11:24:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725669#M592003</guid>
      <dc:creator>AngieO2019</dc:creator>
      <dc:date>2020-07-07T11:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725837#M592004</link>
      <description>&lt;P&gt;I may have inadvertently stumbled upon things I think, check the following Help link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/AggregationFunctions/max.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/AggregationFunctions/max.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 18:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725837#M592004</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-07T18:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725893#M592005</link>
      <description>&lt;P&gt;Can you tell me how do you want to Rank your score? If score is same then repeat the previous rank and for next rank increment the current row position?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Data:
LOAD
    ID,
    Score
FROM [lib://Data/SampleData.xlsx]
(ooxml, embedded labels, table is Sheet2);

Left Join(Data)
Load Count(DISTINCT ID) as TotalID
Resident Data;

Rank:
Load ID,
     sum(Score) as TotalScore
Resident Data
Group by ID;

Left Join (Data)
Load ID,
     TotalScore,
     if(RowNo()=1,1,if(TotalScore&amp;lt;&amp;gt;Peek(TotalScore),RowNo(),
     Peek(Rank)))as Rank
Resident Rank
Order by TotalScore desc;

Drop Table Rank;

Final:
Load *,
     (TotalID-Rank)/TotalID as Rank%
Resident Data;

Drop Table Data;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jul 2020 21:51:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725893#M592005</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-07T21:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rank (Sum) to scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725952#M592006</link>
      <description>&lt;P&gt;Hi kush141087,&lt;/P&gt;&lt;P&gt;We were actually trying to replicate the PercentRank function of Excel. We thought that RangeFractile is the best bet to this, however, it seems like it only replicates the values in the Scores column.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 06:46:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Sum-to-scripts/m-p/1725952#M592006</guid>
      <dc:creator>AngieO2019</dc:creator>
      <dc:date>2020-07-08T06:46:04Z</dc:date>
    </item>
  </channel>
</rss>

