<?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 Braches in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864170#M996029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am learning a lot from your responses(Thanks!).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just couldn't get what portion is giving rank 1 to highest sale group by monthyear and then rest of the ranks in descending order of TotalSales?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Digvijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2015 12:37:16 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2015-06-20T12:37:16Z</dc:date>
    <item>
      <title>Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864162#M996021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a Sales table with multiple branches,Customers and their sales&lt;/P&gt;&lt;P&gt;now I want to rank the customers for each Month by branch according to sales&amp;nbsp; and take top 5 customers&lt;/P&gt;&lt;P&gt;from each branch to a chart&lt;/P&gt;&lt;P&gt;I want the ranking to done on the Script itself&lt;/P&gt;&lt;P&gt;please help me in doing this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864162#M996021</guid>
      <dc:creator />
      <dc:date>2015-06-19T14:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864163#M996022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rank the total sales (for all dates) or each date's rank?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864163#M996022</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-19T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864164#M996023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sunny &lt;/P&gt;&lt;P&gt;Sorry Rank by Month &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864164#M996023</guid>
      <dc:creator />
      <dc:date>2015-06-19T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864165#M996024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD branch, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(date) as MonthYear, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customer, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Community_169202.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Join(Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD branch,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; customer,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; MonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Sum(sales) as TotalSales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By branch, customer, MonthYear;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Join(Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD distinct branch,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; MonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; customer,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; TotalSales,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(branch = Peek('branch'), Alt(Peek('Rank'), 1) + 1, 1) as Rank&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By branch, MonthYear, TotalSales desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864165#M996024</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-19T14:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864166#M996025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;When I use this script in my actual data, My System Got hanged twice&lt;/P&gt;&lt;P&gt;Is there any other option for this&lt;/P&gt;&lt;P&gt;please Suggest &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864166#M996025</guid>
      <dc:creator />
      <dc:date>2015-06-19T22:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864167#M996026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How big is your database?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 02:15:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864167#M996026</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-20T02:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864168#M996027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;22 million transaction Lines&lt;/P&gt;&lt;P&gt;there are 152 branches &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 08:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864168#M996027</guid>
      <dc:creator />
      <dc:date>2015-06-20T08:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864169#M996028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I've understood, you wan to rank sales by customer per MonthYear and branch.&lt;/P&gt;&lt;P&gt;I think above solution only does it per branch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joining the complete fact table back to itself is somewhat ressource expensive (and the distinct load prefix will be performed on the output table!).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14347943160054147 jive_text_macro" jivemacro_uid="_14347943160054147"&gt;
&lt;P&gt;// First create more random data, since your excel only shows data for a #1 customer rank per MonthYear and branch.&lt;/P&gt;
&lt;P&gt;// You don't need the foor loop and the customer / sales mods, just load your real data from your source.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i = 1 to 20&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;LOAD branch,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(date) as MonthYear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customer + floor(RAND()*10) as customer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sales + ceil(RAND()*100) as sales&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;Community_169202.xlsx&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NEXT i&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// sum(sales) grouped by customer, branch, MonthYear&lt;/P&gt;
&lt;P&gt;TMP:&lt;/P&gt;
&lt;P&gt;LOAD branch,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; customer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; MonthYear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sum(sales) as TotalSales&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //Rank(Sum(sales)) as Rank2&lt;/P&gt;
&lt;P&gt;Resident Table&lt;/P&gt;
&lt;P&gt;Group By branch, customer, MonthYear;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Create the rank and Join back to fact table. You can comment out the preceding load to get a full ranking&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (Table)&lt;/P&gt;
&lt;P&gt;LOAD * WHERE Rank &amp;lt;= 5;&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; branch,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; customer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; MonthYear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TotalSales,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; AutoNumber(customer, branch &amp;amp; MonthYear) as Rank&lt;/P&gt;
&lt;P&gt;RESIDENT TMP&lt;/P&gt;
&lt;P&gt;order by branch, MonthYear, TotalSales desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;drop table TMP;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 09:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864169#M996028</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-20T09:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864170#M996029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am learning a lot from your responses(Thanks!).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just couldn't get what portion is giving rank 1 to highest sale group by monthyear and then rest of the ranks in descending order of TotalSales?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Digvijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 12:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864170#M996029</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-06-20T12:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864171#M996030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the last load statement, the records will come in ordered by branch, MonthYear, TotalSales descending, so you just need to start counting customers from 1 whenever there is change in the combination branch and MonthYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is done by Autonumber() function, you can do the same with a peek() logic as sunindia demonstrates above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: For me, it's a little easier to read and understand what the autonumber is doing compared to the method using peek().&lt;/P&gt;&lt;P&gt;But I've seen perfomance issues using Autonumber() when there is a large number of combinations of branch / MonthYear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 12:42:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864171#M996030</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-20T12:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864172#M996031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Swuehl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I Use this Script on my Original Data &lt;/P&gt;&lt;P&gt;During the Execution Of the following Lines&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; * &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Rank &amp;lt;= 5;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;LOAD&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; branch,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; customer,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; MonthYear,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; TotalSales,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; AutoNumber(customer, branch &amp;amp; MonthYear) &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Rank&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;RESIDENT TMP&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;order&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; branch, MonthYear, TotalSales &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;desc&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; TMP;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;it is showing Error as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;No Table found&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Any Suggestions&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 18:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864172#M996031</guid>
      <dc:creator />
      <dc:date>2015-06-21T18:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864173#M996032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post your complete script or document log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like table TMP is not found, but I can't see the reason for that only seeing the snippet you've posted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 18:25:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864173#M996032</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-21T18:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864174#M996033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Swuehl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the actual Script I&amp;nbsp; am Using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SALES:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 994px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="994"&gt;LOAD BRNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; MonthName (DATE) AS DEC_Month,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUSTNUM + floor(RAND()*10) as CUSTNUM ,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES+ ceil(RAND()*100) as SALES&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;FROM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;QVD\SALES2015.qvd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&lt;STRONG&gt;TMP:&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;LOAD BRNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; DEC_Month,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; CUSTNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; Sum(SALES) as SALES&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; Resident SALES&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt; Group By&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; BRNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; DEC_Month,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; CUSTNUM;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;LEFT JOIN (SALES)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;LOAD * WHERE Rank &amp;lt;= 200;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;LOAD BRNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; DEC_Month,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; CUSTNUM,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; SALES,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;&amp;nbsp; AutoNumber(CUSTNUM, BRNUM&amp;amp; DEC_Month) as Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;RESIDENT TMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;order by BRNUM, DEC_Month, SALES desc;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 18:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864174#M996033</guid>
      <dc:creator />
      <dc:date>2015-06-21T18:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864175#M996034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your TMP table, you used an alias SALES instead of TotalSales for the aggregated Sales per customer.&lt;/P&gt;&lt;P&gt;Thus (having same number and name of fields) the TMP table will be auto-concatenated to the SALES table and will not exist as a separate table in the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you start with using the same field names as in my example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also don't need to modify your customer and sales data when reading from your source, I did this only because your sample data set showed not enough data for your ranking request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUSTNUM + floor(RAND()*10) as CUSTNUM ,&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES+ ceil(RAND()*100) as SALES&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be replaced with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUSTNUM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SALES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when handling your real data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 18:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864175#M996034</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-21T18:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864176#M996035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl&lt;/P&gt;&lt;P&gt;Thanks as Lot,&lt;/P&gt;&lt;P&gt;Thank you Very For your Help&lt;/P&gt;&lt;P&gt;One More Question&lt;/P&gt;&lt;P&gt;Now I Want to Take&amp;nbsp; sales for top 200 Customers for each branch for current month - &lt;SPAN style="font-size: 13.3333330154419px;"&gt;sales for top 200 Customers for each branch from &lt;/SPAN&gt;Last Month&amp;nbsp; &lt;/P&gt;&lt;P&gt;How Can I do This Please Suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 21:14:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864176#M996035</guid>
      <dc:creator />
      <dc:date>2015-06-21T21:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864177#M996036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sunny &lt;/P&gt;&lt;P&gt;Thank you Very&amp;nbsp; Much For Your&amp;nbsp; Help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 21:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864177#M996036</guid>
      <dc:creator />
      <dc:date>2015-06-21T21:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864178#M996037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are very welcome. I wish I could have been more helpful, but I am glad you got the help from no less than the best &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 21:58:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864178#M996037</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-21T21:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Braches</title>
      <link>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864179#M996038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample QVW that demonstrates how you can compare the monthly sales for top customers in a chart (top 5 customers in my sample, but easy to adapt to 200)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 22:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ranking-Braches/m-p/864179#M996038</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-21T22:06:45Z</dc:date>
    </item>
  </channel>
</rss>

