<?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 Noob question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142532#M21976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Yes it could work. The problem i just realize, i have several similar movement with same date. The info would could distinct them is the hour.&lt;/P&gt;&lt;P&gt;The consequence is, qlik can not find a cost price because he's lost when he has to take it btw several movement with exact same date. So i will need to make a key to concatenate max date and make hour. An idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2009 22:09:54 GMT</pubDate>
    <dc:creator>alex59800</dc:creator>
    <dc:date>2009-04-27T22:09:54Z</dc:date>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142525#M21969</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;I have a problem in making a easy link between 2 files:&lt;/P&gt;&lt;P&gt;I made my example in this attached file. If someone could help it would be very appreciated.&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 17:38:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142525#M21969</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2009-04-27T17:38:10Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142526#M21970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex,&lt;/P&gt;&lt;P&gt;I looked at your Excel sheet and suggest this solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;STOCKS:&lt;BR /&gt;LOAD ARTIC1 as [Product],&lt;BR /&gt; makedate(SOANNE,SOMOIS,SOJOUR) as DATE,&lt;BR /&gt; SOMT1E as LASTPMP;&lt;BR /&gt;SQL SELECT ARTIC1,&lt;BR /&gt; SOANNE,&lt;BR /&gt; SOJOUR,&lt;BR /&gt; SOMOIS,&lt;BR /&gt; SOMT1E&lt;BR /&gt;FROM ... where SOJRN&amp;lt;&amp;gt;'ECA' and SOSTSA=2;&lt;BR /&gt;&lt;BR /&gt;BASE:&lt;BR /&gt;LOAD [Product],&lt;BR /&gt; max(DATE) as DATE,&lt;BR /&gt;LASTPMP&lt;BR /&gt;RESIDENT STOCKS&lt;BR /&gt;GROUP BY [Product];&lt;BR /&gt;&lt;BR /&gt;INNER JOIN (BASE):&lt;BR /&gt;LOAD PRODUCT as [Product],&lt;BR /&gt; QTY iN STOCK AS QTY&lt;BR /&gt;FROM SECOND FILE;&lt;BR /&gt;DROP TABLE STOCKS;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The BASE Table should contain the result you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 18:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142526#M21970</guid>
      <dc:creator />
      <dc:date>2009-04-27T18:03:12Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142527#M21971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for yout answer but no, it's not working.&lt;/P&gt;&lt;P&gt;I think qlikview is loosing itselft with the "LASTPMP" in BASE:&lt;/P&gt;&lt;P&gt;The script is taking the good date with the max(DATE) but how can Qlikview can suceed in grouping the LASTPMP (cost price related with the last date movement).&lt;/P&gt;&lt;P&gt;I have an error reloading&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 18:33:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142527#M21971</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2009-04-27T18:33:55Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142528#M21972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try including LASTPMP in GROUP BY:&lt;/P&gt;&lt;P&gt;[code[BASE:&lt;BR /&gt;LOAD [Product],&lt;BR /&gt;LASTPMP,&lt;BR /&gt;max(DATE) as DATE&lt;BR /&gt;RESIDENT STOCKS GROUP BY [Product],LASTPMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 18:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142528#M21972</guid>
      <dc:creator />
      <dc:date>2009-04-27T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142529#M21973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I just tried, but it's not working either, i think the "Group by" does not work because of LASTPMP. i store BASE into a qvd to see what it looks like and he give all the movements of my stock instaed of the last date movement with the related Cost price.&lt;/P&gt;&lt;P&gt;In consequence, with the inner join, qlik give me the physical stock of a product X by each line he found for a same product . so my stock is totaly false. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 19:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142529#M21973</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2009-04-27T19:16:31Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142530#M21974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;1. Load the table and sort it by Product, Date descending.&lt;/P&gt;&lt;P&gt;2. Do a peek on Product and when it changes you add a flag with a value, 1, and let all other rows be 0. If(peek('Product')&amp;lt;&amp;gt;Product,1,0) as Flag.&lt;/P&gt;&lt;P&gt;3. Use the flag in the layout perhaps to only select the max(date)-row for each product, or use it on the script side to only keep those rows using a resident load and where(Flag)=1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 19:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142530#M21974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-27T19:38:08Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142531#M21975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, I decided to test it myself and the group by did not work. I fixed your problem with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Firstfile:&lt;BR /&gt;LOAD Product,&lt;BR /&gt; DATE,&lt;BR /&gt; LASTPMP&lt;BR /&gt;FROM FIRSTFILE;&lt;BR /&gt;Secondfile:&lt;BR /&gt;LOAD PRODUCT,&lt;BR /&gt; STOCK&lt;BR /&gt;FROM SECONDFILE;&lt;BR /&gt;Result:&lt;BR /&gt;LOAD&lt;BR /&gt;Product,&lt;BR /&gt;max(DATE) as MDATE&lt;BR /&gt;RESIDENT Firstfile GROUP BY Product;&lt;BR /&gt;INNER JOIN (Result)&lt;BR /&gt;LOAD&lt;BR /&gt; Product,&lt;BR /&gt; DATE as MDATE,&lt;BR /&gt; LASTPMP&lt;BR /&gt;RESIDENT Firstfile;&lt;BR /&gt;INNER JOIN (Result)&lt;BR /&gt;LOAD&lt;BR /&gt; PRODUCT as Product,&lt;BR /&gt; STOCK&lt;BR /&gt;RESIDENT Secondfile;&lt;BR /&gt;DROP TABLE Firstfile;&lt;BR /&gt;DROP TABLE Secondfile;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 19:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142531#M21975</guid>
      <dc:creator />
      <dc:date>2009-04-27T19:38:50Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142532#M21976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Yes it could work. The problem i just realize, i have several similar movement with same date. The info would could distinct them is the hour.&lt;/P&gt;&lt;P&gt;The consequence is, qlik can not find a cost price because he's lost when he has to take it btw several movement with exact same date. So i will need to make a key to concatenate max date and make hour. An idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 22:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142532#M21976</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2009-04-27T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142533#M21977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try Timestamp():&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Firstfile:&lt;BR /&gt;LOAD Product,&lt;BR /&gt; Timestamp(Date(DATE)&amp;amp;' '&amp;amp;Time(HOUR)) AS DATE,&lt;BR /&gt; HOUR,&lt;BR /&gt; LASTPMP&lt;BR /&gt;FROM FIRSTFILE;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 22:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142533#M21977</guid>
      <dc:creator />
      <dc:date>2009-04-27T22:27:26Z</dc:date>
    </item>
    <item>
      <title>Noob question</title>
      <link>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142534#M21978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;After some hard work, you drove me to the right way, thank a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 02:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Noob-question/m-p/142534#M21978</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2009-05-02T02:57:30Z</dc:date>
    </item>
  </channel>
</rss>

