<?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: Autonumber and ranking in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285015#M402447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonanthan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the response. I tried this but again same problem. Its taking just too much time so that I have to abort the reload, before it finishes.&lt;/P&gt;&lt;P&gt;I tried Autonumberhash128, but that doesnt give desired result. Can you please suggest some alternative to autonumber here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2016 05:49:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-06T05:49:57Z</dc:date>
    <item>
      <title>Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285013#M402445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set where I have to find rank of rows based on many fields and then based on the rank I have to sum the data.&lt;/P&gt;&lt;P&gt;So, I am using rowno and autonumber to find the rank. The problem is since I have many fields in the row, when I work with sample data it is fine but with actual set it is very very slow and undoable. Please advice.&lt;/P&gt;&lt;P&gt;Attaching sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;LOAD Market, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Planning Article], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; W_Period, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WS_Qty&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\..\..\Users\user\Desktop\data.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is sample.xls);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank_Temp1:&lt;/P&gt;&lt;P&gt;LOAD RowNo() as Rowno,Market, Period,W_Period,&lt;/P&gt;&lt;P&gt;[Planning Article],&lt;SPAN style="font-size: 13.3333px;"&gt;Article&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Market&amp;amp;Period&amp;amp;W_Period&amp;amp;[Planning Article]&amp;amp;&lt;SPAN style="font-size: 13.3333px;"&gt;Article&lt;/SPAN&gt; as RankKey,&lt;/P&gt;&lt;P&gt; Sum(WS_Qty) as Sum_WS_Qty&lt;/P&gt;&lt;P&gt;Resident data&lt;/P&gt;&lt;P&gt;Group By &lt;/P&gt;&lt;P&gt;Market,Period,W_Period,&lt;/P&gt;&lt;P&gt;[Planning Article],&lt;SPAN style="font-size: 13.3333px;"&gt;Article&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Order By W_Period Desc;&lt;/P&gt;&lt;P&gt;drop table data;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Rank_Temp2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;AutoNumber(Rowno,RankKey) as Rank&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Resident Rank_Temp1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DROP Table Rank_Temp1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 03:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285013#M402445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T03:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285014#M402446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do it in a single pass like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; RowNo() as Rowno,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Market,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; W_Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; [Planning Article],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Article,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Sum(WS_Qty) as Sum_WS_Qty,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; AutoNumber(RowNo(), RankKey) as Rank&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Group By Market,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; W_Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Planning Article],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RankKey&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Market,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Planning Article],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; W_Period,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WS_Qty,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Market &amp;amp; Period &amp;amp; W_Period &amp;amp; [Planning Article] &amp;amp; Article as RankKey&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM [..\..\..\Users\user\Desktop\data.xlsx]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(ooxml, embedded labels, table is sample.xls);&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 05:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285014#M402446</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-12-06T05:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285015#M402447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonanthan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the response. I tried this but again same problem. Its taking just too much time so that I have to abort the reload, before it finishes.&lt;/P&gt;&lt;P&gt;I tried Autonumberhash128, but that doesnt give desired result. Can you please suggest some alternative to autonumber here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 05:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285015#M402447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T05:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285016#M402448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggregation-loads with group by are always quite slow compared with "normal" loadings. Therefore you should check if you such load really needs or if it's not possible to aggregate this within the gui. Especially if you have many fields within the group by which indicates that the compression-rate of records is rather small - maybe you don't need all fields within the group by then it could be a benefit to split these within a separate load within a particular table or to merge the tables again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point is your order by within the load - most often it's faster to split load-statements in this order:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. load with where-clause&lt;/P&gt;&lt;P&gt;2. load with order by&lt;/P&gt;&lt;P&gt;3. load with group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of combining these within a single-load-statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this didn't speed up the load how do you it needed you will need to use an incremental approach. Here you will find various links to them and some other helpful topics, too: &lt;A href="https://community.qlik.com/docs/DOC-9038"&gt;Advanced topics for creating a qlik datamodel&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285016#M402448</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-06T08:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285017#M402449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I first did it in gui using rank function but due to complex nature of reports, the performance of highly degraded. I have tried to break down the load statement in many bits, save as QVDs asn then use it as well. But no good.Thanks for the link!&lt;/P&gt;&lt;P&gt;One question, will here FirstSortedvalue work as an alternative to autonumber for ranking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285017#M402449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T08:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285018#M402450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruchi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think that firstsortedvalue() will help or change it significantly then it's also an aggregation-function. Beside them I could imagine that there are further possibilities within the datamodel to improve the performance and to make these calculations within the gui because you are loading the data from an single sheet in excel which meant that the amount of data is rather small - max. number of records about 1 M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 09:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285018#M402450</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-06T09:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Autonumber and ranking in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285019#M402451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes trying to explore changes in the data model. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 09:20:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autonumber-and-ranking-in-load-script/m-p/1285019#M402451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-06T09:20:15Z</dc:date>
    </item>
  </channel>
</rss>

