<?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 in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609061#M597244</link>
    <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;Try this &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;Num&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;Avg&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Crit&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= {Yes},&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#800000"&gt;Status&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= {Active},&lt;SPAN&gt; &lt;FONT color="#800000"&gt;Rank(Only({&amp;lt;Crit = {Yes}, Status = {Active}&amp;gt;} Age), 4) &lt;/FONT&gt;&lt;/SPAN&gt;= {&lt;FONT color="#800000"&gt;" &amp;lt;= 5"&lt;/FONT&gt;}&amp;gt;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#800000"&gt;Age&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT size="4"&gt;), '#,##0.#')&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 20:53:08 GMT</pubDate>
    <dc:creator>bharathadde</dc:creator>
    <dc:date>2019-08-02T20:53:08Z</dc:date>
    <item>
      <title>Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609023#M597242</link>
      <description>&lt;P&gt;I need to create an expression in the script to determine the average age of the top 5 oldest active critical cases. I have these fields: [Crit] = Yes/No,&amp;nbsp; [Age]=#, [Status] = Active, Solved, … [Case #]=...&lt;/P&gt;&lt;P&gt;This is how I did it in an expression but this must be done in the script so I am unable to use set analysis.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;Num&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;Avg&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Crit&lt;/FONT&gt; = {Yes}, &lt;FONT color="#800000"&gt;Status&lt;/FONT&gt; = {Active}, &lt;FONT color="#800000"&gt;Age&lt;/FONT&gt; = {&lt;FONT color="#800000"&gt;"=Rank(Only({&amp;lt;Crit = {Yes}, Status = {Active}&amp;gt;} Age), 4) &amp;lt;= 5"&lt;/FONT&gt;}&amp;gt;} &lt;FONT color="#800000"&gt;Age&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT size="4"&gt;), '#,##0.#')&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I would really appreciate any help.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609023#M597242</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2024-11-16T20:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609061#M597244</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;Try this &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;Num&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;Avg&lt;/FONT&gt;({&amp;lt;&lt;FONT color="#800000"&gt;Crit&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= {Yes},&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#800000"&gt;Status&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= {Active},&lt;SPAN&gt; &lt;FONT color="#800000"&gt;Rank(Only({&amp;lt;Crit = {Yes}, Status = {Active}&amp;gt;} Age), 4) &lt;/FONT&gt;&lt;/SPAN&gt;= {&lt;FONT color="#800000"&gt;" &amp;lt;= 5"&lt;/FONT&gt;}&amp;gt;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#800000"&gt;Age&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT size="4"&gt;), '#,##0.#')&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609061#M597244</guid>
      <dc:creator>bharathadde</dc:creator>
      <dc:date>2019-08-02T20:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609370#M597246</link>
      <description>&lt;P&gt;I need to do this in the script so I am not able to use set analysis like this.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 12:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609370#M597246</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-08-05T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609480#M597247</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;I don't know if it works&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;but just give it a try&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT color="#0000ff"&gt;=if(&lt;/FONT&gt;&lt;FONT color="#800000"&gt;Crit&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= 'Yes' and&amp;nbsp;&lt;FONT color="#800000"&gt;Status&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= 'Active' and&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;FONT color="#0000ff"&gt;if(&lt;/FONT&gt;&lt;FONT color="#800000"&gt;Crit&lt;/FONT&gt;&amp;nbsp;= 'Yes' and&amp;nbsp;&lt;FONT color="#800000"&gt;Status&lt;/FONT&gt;&amp;nbsp;= 'Active',&amp;nbsp;&lt;FONT color="#800000"&gt;Rank( Age), 4))&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#800000"&gt;&amp;nbsp;&amp;lt;= 5,Num(Avg(&lt;/FONT&gt;&lt;FONT color="#800000"&gt;Age&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT size="4"&gt;), '#,##0.#'))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 15:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609480#M597247</guid>
      <dc:creator>bharathadde</dc:creator>
      <dc:date>2019-08-05T15:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609499#M597248</link>
      <description>&lt;P&gt;Unfortunately you cannot use the Rank() function in the script.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 16:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609499#M597248</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-08-05T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609505#M597249</link>
      <description>&lt;P&gt;can you share the qvw or at least some kind of raw data to replicate the issue?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 16:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609505#M597249</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-08-05T16:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rank in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609519#M597250</link>
      <description>&lt;P&gt;I solved the issue. I loaded the first 5 active critical cases with age descending. I then used another table to get the average of these five values.&lt;/P&gt;&lt;P&gt;ActiveOldestCritical:&lt;/P&gt;&lt;P&gt;First 5 Load Age as AOCAge,&lt;/P&gt;&lt;P&gt;Status as AOCStatus,&lt;/P&gt;&lt;P&gt;Crit as AOCCrit&lt;/P&gt;&lt;P&gt;Resident Final&lt;/P&gt;&lt;P&gt;where Status = 'Active' and Crit = 'Yes'&lt;/P&gt;&lt;P&gt;order by Age desc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CaseAverages:&lt;/P&gt;&lt;P&gt;Load Avg(AOCAge) as AOCAgeAve&lt;/P&gt;&lt;P&gt;Resident ActiveOldestCritical;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 17:19:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-in-Script/m-p/1609519#M597250</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-08-05T17:19:40Z</dc:date>
    </item>
  </channel>
</rss>

