<?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: rowno() not working if preceding load added in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380951#M701657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading an explanation about how preceding load works, I think the result you have is because in preceding load the process of each record takes place in each iteration, so RowNo() is always its first value for each iteration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the explanation I think it is the most accurate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;A href="https://community.qlik.com/people/hic"&gt;hic&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load#comment-7126" style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #a9a9a9;"&gt;Mar 6, 2013 2:31 PM&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; (&lt;/SPAN&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load#comment-7105" style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #a9a9a9;" title="Ir al mensaje"&gt;en respuesta a qlikviewed&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let's say that you have the following construction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *, SomeFunction(X,Y) as Z; // Load statement "B"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load X, Y From ... ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Load statement "A"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then each record that is loaded by "A" is &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;piped &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;into "B". This means that "B" processes the first record completely &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;before &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;"A" starts to process the second record. In other words: the result of "A" is &lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;never stored as a table&lt;/EM&gt;&lt;/SPAN&gt; - neither on disk, nor in RAM. So you can't say that "B" loads a table from RAM or from disk.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;-Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2014 17:03:35 GMT</pubDate>
    <dc:creator>chematos</dc:creator>
    <dc:date>2014-07-29T17:03:35Z</dc:date>
    <item>
      <title>rowno() not working if preceding load added</title>
      <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380947#M701653</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;if I use something like this in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD recno() as ID, rowno() as Test&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 5;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I get values 1 to 5 in field Test, as expected, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID, Test&lt;/P&gt;&lt;P&gt;1,1&lt;/P&gt;&lt;P&gt;2,2&lt;/P&gt;&lt;P&gt;3,3&lt;/P&gt;&lt;P&gt;4,4&lt;/P&gt;&lt;P&gt;5,5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does this break (IMHO) if I add a preceding load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD recno() as ID, rowno() as Test&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 5;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns (tested in QV 11SR1 and some older versions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID, Test&lt;/P&gt;&lt;P&gt;1,0&lt;/P&gt;&lt;P&gt;2,0&lt;/P&gt;&lt;P&gt;3,0&lt;/P&gt;&lt;P&gt;4,0&lt;/P&gt;&lt;P&gt;5,0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I noticed, that asking 'why' might not be the right questions to ask here in the community, but I am just curious, maybe someone knows...&lt;/P&gt;&lt;P&gt;Adding to this, I am essentially not interested in workarounds to get Test count from 1 to 5 like in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD ID, rowno() as Test&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD recno() as ID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 5;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but to understand if this is a bug in the software or in my understanding of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2012 10:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380947#M701653</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-25T10:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: rowno() not working if preceding load added</title>
      <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380948#M701654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm asking myself the same question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you discover why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 15:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380948#M701654</guid>
      <dc:creator />
      <dc:date>2014-07-29T15:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: rowno() not working if preceding load added</title>
      <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380949#M701655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think this behavior is counter intuitive, but may be normal behavior (I don't know). I've seem this in the past and I think that preceding loads cannot be used together with autogenerate/while statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if you modify the code to do the following, QV will loop forever:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;LOAD recno() as ID, rowno() as Test&lt;/P&gt;&lt;P&gt;AutoGenerate 1&lt;/P&gt;&lt;P&gt;while RowNo()&amp;nbsp; &amp;lt;=5;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, if you remove the preceding load from any of the examples, it will work as expected,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;really weird,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 16:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380949#M701655</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-07-29T16:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: rowno() not working if preceding load added</title>
      <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380950#M701656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I can explain this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RowNo() is the &lt;STRONG&gt;output&lt;/STRONG&gt; table row number. The top LOAD statement defines the output, so RowNo() can only return a valid result there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 16:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380950#M701656</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-07-29T16:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: rowno() not working if preceding load added</title>
      <link>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380951#M701657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading an explanation about how preceding load works, I think the result you have is because in preceding load the process of each record takes place in each iteration, so RowNo() is always its first value for each iteration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the explanation I think it is the most accurate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;A href="https://community.qlik.com/people/hic"&gt;hic&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load#comment-7126" style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #a9a9a9;"&gt;Mar 6, 2013 2:31 PM&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; (&lt;/SPAN&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load#comment-7105" style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #a9a9a9;" title="Ir al mensaje"&gt;en respuesta a qlikviewed&lt;/A&gt;&lt;SPAN style="color: #a9a9a9; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let's say that you have the following construction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *, SomeFunction(X,Y) as Z; // Load statement "B"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load X, Y From ... ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Load statement "A"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Then each record that is loaded by "A" is &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;piped &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;into "B". This means that "B" processes the first record completely &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;before &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;"A" starts to process the second record. In other words: the result of "A" is &lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;never stored as a table&lt;/EM&gt;&lt;/SPAN&gt; - neither on disk, nor in RAM. So you can't say that "B" loads a table from RAM or from disk.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;-Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 17:03:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rowno-not-working-if-preceding-load-added/m-p/380951#M701657</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2014-07-29T17:03:35Z</dc:date>
    </item>
  </channel>
</rss>

