<?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: Find out max numerical value in a QlikView script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387547#M1150362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this. Unfortunately I get a script error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error: &lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD max(FieldValue('RecNo', recno())) as MaxRecNo AUTOGENERATE FieldValueCount('RecNo')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Temp table is not created. I get an error when the script attempts to drop the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 09:48:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-21T09:48:07Z</dc:date>
    <item>
      <title>Find out max numerical value in a QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387545#M1150360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just been using QV for a week, so forige an obvious question. I've tried googling for this information with not much success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to construct an incremental load for my fact table. The fact table contains a primary key which takes the form of a [double] numerical integer. The column name for the PK is RecNo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to include a where statement into my load statement e.g. 'WHERE RecNo &amp;gt; $(MaxRecNo)'. Ths script works fine if I set the value for MaxRecNo e.g. Let MaxRecNo = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I calcualte the maximum value of RecNo for the records already loaded into QV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 17:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387545#M1150360</guid>
      <dc:creator />
      <dc:date>2013-05-20T17:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find out max numerical value in a QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387546#M1150361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LOAD max(RecNo) as &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MaxRecNo&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LOAD FieldValue('RecNo', recno()) as RecNo &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;AUTOGENERATE FieldValueCount('RecNo');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LET vMaxRecNo = peek('MaxRecNo');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;drop Table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 17:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387546#M1150361</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-20T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find out max numerical value in a QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387547#M1150362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this. Unfortunately I get a script error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script line error: &lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD max(FieldValue('RecNo', recno())) as MaxRecNo AUTOGENERATE FieldValueCount('RecNo')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Temp table is not created. I get an error when the script attempts to drop the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 09:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387547#M1150362</guid>
      <dc:creator />
      <dc:date>2013-05-21T09:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Find out max numerical value in a QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387548#M1150363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14000696133025991 jive_macro_code" jivemacro_uid="_14000696133025991" modifiedtitle="true"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;Load RecNo() as Recno AutoGenerate 100;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;_TmpTable:&lt;/P&gt;
&lt;P&gt;Load Max(Recno) as MaxRecNo resident Data; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Let MaxRecNo = FieldValue('MaxRecNo', 1);&lt;/P&gt;
&lt;P&gt;Drop Table _TmpTable;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Concatenate:&lt;/P&gt;
&lt;P&gt;Load Recno where Recno&amp;gt; $(MaxRecNo);&lt;/P&gt;
&lt;P&gt;Load RecNo() as Recno AutoGenerate 200; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 12:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-out-max-numerical-value-in-a-QlikView-script/m-p/387548#M1150363</guid>
      <dc:creator>martinpedersen</dc:creator>
      <dc:date>2014-05-14T12:19:37Z</dc:date>
    </item>
  </channel>
</rss>

