<?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 AW:Max function needed in LOAD SCRIPT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310485#M1198276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello henry,&lt;/P&gt;&lt;P&gt;check out this script code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;TT:&lt;BR /&gt;load * Inline [&lt;BR /&gt;Id, Val, salesperson&lt;BR /&gt;1, 10, a&lt;BR /&gt;2, 20, a&lt;BR /&gt;3, 30, b&lt;BR /&gt;4, 40, c&lt;BR /&gt;5, 50, b&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt; salesperson,&lt;BR /&gt; max(if(len(salesperson&amp;gt;0),Val)) as MaxVal&lt;BR /&gt;Resident TT&lt;BR /&gt;Group by salesperson;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2011 17:16:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-03T17:16:03Z</dc:date>
    <item>
      <title>Max function needed in LOAD SCRIPT</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310483#M1198274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have sequentially numbered days. I'd like to assign the LATEST DAY number for which there is sales data to a variable for ease of use in expression writing instead of using max(if(len(saleperson&amp;gt;0),daynumber))&lt;/P&gt;&lt;P&gt;Is this possible? Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 16:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310483#M1198274</guid>
      <dc:creator />
      <dc:date>2011-03-03T16:44:56Z</dc:date>
    </item>
    <item>
      <title>Max function needed in LOAD SCRIPT</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310484#M1198275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the PEEK-command you can retrieve a certain record out of a table. If your table is already sorted (either descending or ascending), you may straight use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET v = PEEK('YourDateNumber', 0, 'YourTableName'); // First record&lt;BR /&gt;LET LET v = PEEK('YourDateNumber', -1, 'YourTableName'); // Last record&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If the dates in your table are not sorted you need to extract into a temporary table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;temp: LOAD MAX(YourDateNumber) AS LastDate RESIDENT YourTableName;&lt;BR /&gt;LET v = PEEK('YourDateNumber', 0, 'YourTableName');&lt;BR /&gt;DROP TABLE temp:&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Please note the apostrophs in the PEEK-command.&lt;/P&gt;&lt;P&gt;HTH&lt;BR /&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 17:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310484#M1198275</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2011-03-03T17:13:20Z</dc:date>
    </item>
    <item>
      <title>AW:Max function needed in LOAD SCRIPT</title>
      <link>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310485#M1198276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello henry,&lt;/P&gt;&lt;P&gt;check out this script code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;TT:&lt;BR /&gt;load * Inline [&lt;BR /&gt;Id, Val, salesperson&lt;BR /&gt;1, 10, a&lt;BR /&gt;2, 20, a&lt;BR /&gt;3, 30, b&lt;BR /&gt;4, 40, c&lt;BR /&gt;5, 50, b&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt; salesperson,&lt;BR /&gt; max(if(len(salesperson&amp;gt;0),Val)) as MaxVal&lt;BR /&gt;Resident TT&lt;BR /&gt;Group by salesperson;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 17:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-function-needed-in-LOAD-SCRIPT/m-p/310485#M1198276</guid>
      <dc:creator />
      <dc:date>2011-03-03T17:16:03Z</dc:date>
    </item>
  </channel>
</rss>

