<?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 Number ordered sequence of group during load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361101#M417156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UserID, Date, Item&lt;/P&gt;&lt;P&gt;1, 01.01.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 1&lt;/P&gt;&lt;P&gt;1, 01.03.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 3&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1, 01.02.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2, 01.02.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 1&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2, 01.03.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 2&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I want to create a row number for each group (UserID), but within the group the rows need to be sorted by Date.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I need to do this in the load script, as I have more than 5Mio UserIDs.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Can someone give me a hint? I tried the following, and it worked for a small test set, but for the real dataset calculation crashes after hours:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber(RecNo(),UserID) AS Sequence&lt;/P&gt;&lt;P&gt;Resident Fact&lt;/P&gt;&lt;P&gt;Order By &lt;SPAN style="font-size: 13.3333px;"&gt;UserID&lt;/SPAN&gt;,Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Apr 2017 10:25:52 GMT</pubDate>
    <dc:creator>nigel987</dc:creator>
    <dc:date>2017-04-07T10:25:52Z</dc:date>
    <item>
      <title>Number ordered sequence of group during load</title>
      <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361101#M417156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UserID, Date, Item&lt;/P&gt;&lt;P&gt;1, 01.01.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 1&lt;/P&gt;&lt;P&gt;1, 01.03.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 3&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1, 01.02.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2, 01.02.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 1&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;2, 01.03.2017, 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; 2&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I want to create a row number for each group (UserID), but within the group the rows need to be sorted by Date.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I need to do this in the load script, as I have more than 5Mio UserIDs.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Can someone give me a hint? I tried the following, and it worked for a small test set, but for the real dataset calculation crashes after hours:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber(RecNo(),UserID) AS Sequence&lt;/P&gt;&lt;P&gt;Resident Fact&lt;/P&gt;&lt;P&gt;Order By &lt;SPAN style="font-size: 13.3333px;"&gt;UserID&lt;/SPAN&gt;,Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 10:25:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361101#M417156</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2017-04-07T10:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Number ordered sequence of group during load</title>
      <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361102#M417157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try Autonumber(UserID, Date) as sequence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 10:43:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361102#M417157</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2017-04-07T10:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Number ordered sequence of group during load</title>
      <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361103#M417158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This does not deliver correct results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 11:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361103#M417158</guid>
      <dc:creator>nigel987</dc:creator>
      <dc:date>2017-04-07T11:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Number ordered sequence of group during load</title>
      <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361104#M417159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using Peek/Previous&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;UserID&lt;/SPAN&gt; = Previous(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;UserID&lt;/SPAN&gt;), RangeSum(Peek('Sequence'), 1), 1) as Sequence&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Resident Fact&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Order By &lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;UserID&lt;/SPAN&gt;, Date;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 11:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361104#M417159</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-04-07T11:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Number ordered sequence of group during load</title>
      <link>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361105#M417160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Autonumber(UserID&amp;amp;Date, UserID)&amp;nbsp; as instanceID&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 12:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-ordered-sequence-of-group-during-load/m-p/1361105#M417160</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-04-07T12:46:54Z</dc:date>
    </item>
  </channel>
</rss>

