<?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 Ranking in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570643#M212620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create scenario in the script that ranks the top 10 departments (DEPT) based on overtime hours worked (OT HOURS).&amp;nbsp; I'd like to create a variable for each department, 1 through 10.&amp;nbsp; My goal is to take these variables and use them in my set analysis to say, for example ..... &amp;lt; DEPT = { 'Rank3' } &amp;gt; } .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2014 14:04:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-27T14:04:06Z</dc:date>
    <item>
      <title>Ranking in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570643#M212620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create scenario in the script that ranks the top 10 departments (DEPT) based on overtime hours worked (OT HOURS).&amp;nbsp; I'd like to create a variable for each department, 1 through 10.&amp;nbsp; My goal is to take these variables and use them in my set analysis to say, for example ..... &amp;lt; DEPT = { 'Rank3' } &amp;gt; } .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 14:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570643#M212620</guid>
      <dc:creator />
      <dc:date>2014-03-27T14:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570644#M212621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide sample data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple script to get TOP in script can be done as below....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Customer, Sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 100&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 80&lt;/P&gt;&lt;P&gt;&amp;nbsp; C, 30&lt;/P&gt;&lt;P&gt;&amp;nbsp; D, 300&lt;/P&gt;&lt;P&gt;&amp;nbsp; E, 140&lt;/P&gt;&lt;P&gt;&amp;nbsp; F, 60&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 40&lt;/P&gt;&lt;P&gt;&amp;nbsp; C, 80&lt;/P&gt;&lt;P&gt;&amp;nbsp; D, 20&lt;/P&gt;&lt;P&gt;&amp;nbsp; E, 30&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;Load Customer, SUM(Sales) as [Total Sales] &lt;/P&gt;&lt;P&gt;Resident Temp&lt;/P&gt;&lt;P&gt;Group By Customer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;FIRST 3&lt;/P&gt;&lt;P&gt;Load * Resident Temp2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Temp2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 14:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570644#M212621</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-27T14:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570645#M212622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables that I am using for the chart...&amp;nbsp; Table 1 contains DEPT and EmployeeID.&amp;nbsp; Table 2 contains EmployeeID and OTHOURS.&amp;nbsp; To get the total OTHOURS, I am calculating (in the dashboard) the SUM(OTHOURS) for each Employee.&amp;nbsp; So, using teh suggested script will not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to rank the top 10 DEPT's by OTHOURS worked.&amp;nbsp; Again, ranking them into a variable in the script to call on that variable in my set analysis.&amp;nbsp; Just not sure how to do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570645#M212622</guid>
      <dc:creator />
      <dc:date>2014-03-27T15:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570646#M212623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide sample data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570646#M212623</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-27T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Ranking in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570647#M212624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 15:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-in-the-script/m-p/570647#M212624</guid>
      <dc:creator />
      <dc:date>2014-03-27T15:48:10Z</dc:date>
    </item>
  </channel>
</rss>

