<?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: Load Last Value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552555#M598385</link>
    <description>&lt;P&gt;Maybe like that:&lt;/P&gt;&lt;PRE&gt;1:
LOAD rowNo() as Row,
	Customer, 
     Name, 
     Item, 
     [Cost Price], 
     [Invoice date] ,
     [Sales]
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);

left join

2:
Load max(date([Invoice date])) as Max Resident 1;&lt;/PRE&gt;&lt;P&gt;Textbox:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[Invoice date]={'=[Invoice date]=Max'}&amp;gt;}[Cost Price])&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2019 18:20:36 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2019-03-05T18:20:36Z</dc:date>
    <item>
      <title>Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552546#M598384</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How can I load the last Cost Price from the attached files?&lt;/P&gt;&lt;P&gt;I need this to be loaded in the script as I want this as dimension.&lt;/P&gt;&lt;P&gt;So when I change the date in the calendar I will get different sales but last cost price should be always the same based on the latest date. So probably have to be grouped by Customer and Item as well?&lt;/P&gt;&lt;P&gt;Please help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552546#M598384</guid>
      <dc:creator>DavidCov80</dc:creator>
      <dc:date>2024-11-16T21:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552555#M598385</link>
      <description>&lt;P&gt;Maybe like that:&lt;/P&gt;&lt;PRE&gt;1:
LOAD rowNo() as Row,
	Customer, 
     Name, 
     Item, 
     [Cost Price], 
     [Invoice date] ,
     [Sales]
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);

left join

2:
Load max(date([Invoice date])) as Max Resident 1;&lt;/PRE&gt;&lt;P&gt;Textbox:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[Invoice date]={'=[Invoice date]=Max'}&amp;gt;}[Cost Price])&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 18:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552555#M598385</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-03-05T18:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552572#M598386</link>
      <description>&lt;P&gt;Seems to be close, but it should show for all the lines (for the latest date). It only shows for one line. Not sure why. Please see the print screen. Any ideas? Thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.png" style="width: 875px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7312iAD8A4E28D947F2B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.png" alt="example.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 19:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552572#M598386</guid>
      <dc:creator>DavidCov80</dc:creator>
      <dc:date>2019-03-05T19:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552608#M598387</link>
      <description>try this:&lt;BR /&gt;=max(Total{&amp;lt;[Invoice date]={'=[Invoice date]=Max'}&amp;gt;}[Cost Price])</description>
      <pubDate>Tue, 05 Mar 2019 23:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552608#M598387</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-03-05T23:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552815#M598388</link>
      <description>&lt;P&gt;Thank you. Now it looks different. The idea is to get 7.2 for t the first three lines and then 6.6 for another four lines as on the picture:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV Screen.png" style="width: 880px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7351i6CA8965FB96D6863/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV Screen.png" alt="QV Screen.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 09:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552815#M598388</guid>
      <dc:creator>DavidCov80</dc:creator>
      <dc:date>2019-03-06T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552843#M598389</link>
      <description>try this:&lt;BR /&gt;&lt;BR /&gt;=Max(Total &amp;lt;Item&amp;gt; [Cost Price])</description>
      <pubDate>Wed, 06 Mar 2019 10:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552843#M598389</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-03-06T10:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552864#M598390</link>
      <description>&lt;P&gt;Thanks. Seems to be working now. But the last problem is that when I select a date, it's only shows for that date. For example this line on 02/02/2019 has 1.8 Cost Price and Last Cost shows 1.8 as well, but it should be 2.2 like in other table no matter on date. That's why me idea was to get this value as dimension (in the Load Script) but not sure if this or other are possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV_Works_Adj.png" style="width: 866px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7356iD9EF809DABEFF902/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV_Works_Adj.png" alt="QV_Works_Adj.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QV_Works.png" style="width: 878px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/7357iDE080C4349EFF27C/image-size/large?v=v2&amp;amp;px=999" role="button" title="QV_Works.png" alt="QV_Works.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 10:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552864#M598390</guid>
      <dc:creator>DavidCov80</dc:creator>
      <dc:date>2019-03-06T10:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load Last Value</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552872#M598391</link>
      <description>&lt;P&gt;This code in the load script works, a Max(TOTAL &amp;lt;Item. [Cost Price]) will only work if the cost price keeps going up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="1"&gt;/*&lt;BR /&gt;Load the original data table and create a key value on the customer and item field&lt;BR /&gt;*/&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;Data:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Name&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Cost Price]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Invoice date]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Sales&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;KeyValue&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[C:\Users\43820653\Downloads\Data.xlsx]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;ooxml&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;embedded&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;labels&lt;/FONT&gt;&lt;FONT size="1"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;table&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;is&lt;/FONT&gt;&lt;FONT size="1"&gt; Sheet1);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;/*&lt;BR /&gt;Left join to the above table, using the key value, the maximum invoice date&lt;BR /&gt;grouped by customer and item&lt;BR /&gt;*/&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;LEFT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;JOIN&lt;/FONT&gt;&lt;FONT size="1"&gt;(Data)&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;KeyValue&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;MAX&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Invoice date]&lt;/FONT&gt;&lt;FONT size="1"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;MaxInvDate&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; Data&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;GROUP&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;BY&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;/*&lt;BR /&gt;Now reload the data table and generate the new key&lt;BR /&gt;the new key uses the max invoice date&lt;BR /&gt;Note that I have itemised the fields rather than use *&lt;BR /&gt;which alllows me to remove the KeyValue field defined above&lt;BR /&gt;*/&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;Data2:&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;NoConcatenate&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Name&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Cost Price]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Invoice date]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Sales&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;amp;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;amp;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;MaxInvDate&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;Key&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; Data;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;/*&lt;BR /&gt;Now get the cost price from the above table using the original invoice date&lt;BR /&gt;you will find that the only values that are joined are the ones that match max invoice date&lt;BR /&gt;cost price is loaded here as Max Cost price&lt;BR /&gt;&lt;BR /&gt;Note that the resulting table will give you access to both Cost Price and Latest Cost Price&lt;BR /&gt;*/&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;LEFT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;JOIN&lt;/FONT&gt;&lt;FONT size="1"&gt;(Data2)&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;Customer&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;amp;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;Item&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;amp;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;Num&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Invoice date]&lt;/FONT&gt;&lt;FONT size="1"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;Key&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;, &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Cost Price]&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;as&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;LatestCostPrice&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; Data2;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="1"&gt;/*&lt;BR /&gt;Drop (remove) the original data table&lt;BR /&gt;*/&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;DROP&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;TABLE&lt;/FONT&gt;&lt;FONT size="1"&gt; Data;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 11:03:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Last-Value/m-p/1552872#M598391</guid>
      <dc:creator>NW1965</dc:creator>
      <dc:date>2019-03-06T11:03:15Z</dc:date>
    </item>
  </channel>
</rss>

