<?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 Where clause in table with multiple fields using LastValue() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-clause-in-table-with-multiple-fields-using-LastValue/m-p/704383#M1075097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo QV geniuses,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have s script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load UID,&lt;/P&gt;&lt;P&gt;A,&lt;/P&gt;&lt;P&gt;B,&lt;/P&gt;&lt;P&gt;C,&lt;/P&gt;&lt;P&gt;D,&lt;/P&gt;&lt;P&gt;E,&lt;/P&gt;&lt;P&gt;F,&lt;/P&gt;&lt;P&gt;date_modified&lt;/P&gt;&lt;P&gt;FROM excel...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load UID,&lt;/P&gt;&lt;P&gt;LastValue(A) as A_1,&lt;/P&gt;&lt;P&gt;LastValue(B) as B_1,&lt;/P&gt;&lt;P&gt;LastValue(C) as C_1,&lt;/P&gt;&lt;P&gt;LastValue(D) as D_1,&lt;/P&gt;&lt;P&gt;LastValue(E) as E_1,&lt;/P&gt;&lt;P&gt;LastValue(F) as F_1&lt;/P&gt;&lt;P&gt;Resident Table1&lt;/P&gt;&lt;P&gt;where not isNull(UID)&lt;/P&gt;&lt;P&gt;Group by UID&lt;/P&gt;&lt;P&gt;Order by date_modified;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it is ordered by date_modified, it means my LastValue() is the latest. But my problem is: If the LastValue() is NULL, I want to get the previous NON-NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put a:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where not isNull(UID) and not isNull(A) and not isNull(B) and not isNull(C) and not isNull(D) and not isNull(E) and not isNull(F) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work. Can you help me on this? Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Aug 2014 22:03:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-03T22:03:07Z</dc:date>
    <item>
      <title>Where clause in table with multiple fields using LastValue()</title>
      <link>https://community.qlik.com/t5/QlikView/Where-clause-in-table-with-multiple-fields-using-LastValue/m-p/704383#M1075097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo QV geniuses,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have s script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load UID,&lt;/P&gt;&lt;P&gt;A,&lt;/P&gt;&lt;P&gt;B,&lt;/P&gt;&lt;P&gt;C,&lt;/P&gt;&lt;P&gt;D,&lt;/P&gt;&lt;P&gt;E,&lt;/P&gt;&lt;P&gt;F,&lt;/P&gt;&lt;P&gt;date_modified&lt;/P&gt;&lt;P&gt;FROM excel...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load UID,&lt;/P&gt;&lt;P&gt;LastValue(A) as A_1,&lt;/P&gt;&lt;P&gt;LastValue(B) as B_1,&lt;/P&gt;&lt;P&gt;LastValue(C) as C_1,&lt;/P&gt;&lt;P&gt;LastValue(D) as D_1,&lt;/P&gt;&lt;P&gt;LastValue(E) as E_1,&lt;/P&gt;&lt;P&gt;LastValue(F) as F_1&lt;/P&gt;&lt;P&gt;Resident Table1&lt;/P&gt;&lt;P&gt;where not isNull(UID)&lt;/P&gt;&lt;P&gt;Group by UID&lt;/P&gt;&lt;P&gt;Order by date_modified;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it is ordered by date_modified, it means my LastValue() is the latest. But my problem is: If the LastValue() is NULL, I want to get the previous NON-NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put a:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where not isNull(UID) and not isNull(A) and not isNull(B) and not isNull(C) and not isNull(D) and not isNull(E) and not isNull(F) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work. Can you help me on this? Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 22:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-clause-in-table-with-multiple-fields-using-LastValue/m-p/704383#M1075097</guid>
      <dc:creator />
      <dc:date>2014-08-03T22:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Where clause in table with multiple fields using LastValue()</title>
      <link>https://community.qlik.com/t5/QlikView/Where-clause-in-table-with-multiple-fields-using-LastValue/m-p/704384#M1075098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Did you solved it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 13:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-clause-in-table-with-multiple-fields-using-LastValue/m-p/704384#M1075098</guid>
      <dc:creator>pablolabbe</dc:creator>
      <dc:date>2015-02-03T13:30:26Z</dc:date>
    </item>
  </channel>
</rss>

