<?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: How to pull top 100 records from a fact table based on a dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392045#M146231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohit thank you for your reply can you please help me on how to do that in qlikview script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 14:24:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-05-21T14:24:08Z</dc:date>
    <item>
      <title>How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392038#M146224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is the script&amp;nbsp; and For each Division i need top 100 customers based on the Sales Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; Division,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer number],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum([Sales Amount]) as [Sales Amount] &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;V:\Datamart\QVHome\Data\BISalesStatistics.qvd&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where FLAG_TTM=1 &lt;/P&gt;&lt;P&gt;Group by &lt;/P&gt;&lt;P&gt;Division,&lt;/P&gt;&lt;P&gt;[Customer number],&lt;/P&gt;&lt;P&gt;FLAG_TTM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392038#M146224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T13:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392039#M146225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; Division,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer number],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum([Sales Amount]) as [Sales Amount] &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;V:\Datamart\QVHome\Data\BISalesStatistics.qvd&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group by &lt;/P&gt;&lt;P&gt;Division,&lt;/P&gt;&lt;P&gt;[Customer number],&lt;/P&gt;&lt;P&gt;FLAG_TTM&lt;/P&gt;&lt;P&gt;where FLAG_TTM=1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in expression write&lt;/P&gt;&lt;P&gt;if(Rank([Sales Amount]&amp;lt;=100),[Sales Amount] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392039#M146225</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392040#M146226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply Vishwaranjan.. I will try this but is there any way to do the same thing in script. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392040#M146226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392041#M146227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;load table in decending order.then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried the FIRST prefix? From the Help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN class="Bold"&gt;first&lt;/SPAN&gt; prefix to a &lt;A class="jive-link-anchor-small"&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/A&gt; or &lt;A class="jive-link-anchor-small"&gt;&lt;EM&gt;Select (SQL)&lt;/EM&gt;&lt;/A&gt; statement is used for loading just a set maximum number of records from the data source, regardless of its length. &lt;/P&gt;&lt;P&gt;The syntax is:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;first &lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;n( loadstatement | selectstatement )&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;where:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;n&lt;/SPAN&gt; is an arbitrary expressing which evaluates to an integer indicating the maximum number of records to be read. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;First 10 Load * from abc.csv;&lt;/P&gt;&lt;P class="Code"&gt;First (1) Select * from Orders; (Note: The parenthesis is allowed but not required.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392041#M146227</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392042#M146228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FIRST will work but will exlude the rows.&amp;nbsp; Use the example below if you want to return all rows and filter in the UI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; * &lt;/P&gt;&lt;P&gt;,if(RowNo()&amp;lt;=100,1,0) as Top100&lt;/P&gt;&lt;P&gt;Resident YourTable&lt;/P&gt;&lt;P&gt;ORDER BY [Sales Amount] DESC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392042#M146228</guid>
      <dc:creator>RedSky001</dc:creator>
      <dc:date>2013-05-21T13:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392043#M146229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; Division,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer number],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sales Amount] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;V:\Datamart\QVHome\Data\BISalesStatistics.qvd&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabnew:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; load&lt;/P&gt;&lt;P&gt;Division,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer number],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sales Amount] &lt;/P&gt;&lt;P&gt;Resident tab&lt;/P&gt;&lt;P&gt;Order by &lt;/P&gt;&lt;P&gt;[Sales Amount]&amp;nbsp; desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table tab;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;First 100 LOAD&amp;nbsp; Division,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer number],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum([Sales Amount]) as [Sales Amount] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;V:\Datamart\QVHome\Data\BISalesStatistics.qvd&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where FLAG_TTM=1 &lt;/P&gt;&lt;P&gt;Group by &lt;/P&gt;&lt;P&gt;Division,&lt;/P&gt;&lt;P&gt;[Customer number],&lt;/P&gt;&lt;P&gt;FLAG_TTM;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392043#M146229</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392044#M146230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwaranjan thanks a lot on your help, But When i write the &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;First 100 LOAD&amp;nbsp; Division,&lt;/SPAN&gt; script is throwing me an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 14:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392044#M146230</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T14:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull top 100 records from a fact table based on a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392045#M146231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohit thank you for your reply can you please help me on how to do that in qlikview script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 14:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pull-top-100-records-from-a-fact-table-based-on-a/m-p/392045#M146231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-21T14:24:08Z</dc:date>
    </item>
  </channel>
</rss>

