<?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 Select values from the last applicable record in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-values-from-the-last-applicable-record/m-p/719756#M258519</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;&lt;/P&gt;&lt;P&gt;I'm facing a particular problem, which is related to the godawful design of my source database (not me, I hasten to add!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have records that hold a numerical value (COST). Each record have VALIDFROM and VALIDTO date fields. I have to select a VALID date on my UI, and have the values where that date falls between VALIDFROM and VALIDTO displayed in a straight table. I managed to achieve this using a calculated dimension on my table where if this is true it results in a 1, if false it results in a null, and then I supress null values on this dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is the underlying DB and the application that populates that allows for multiple records to have the same or overlapping VALIDFROM and VALIDTO dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="66994" alt="qveg.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/66994_qveg.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this situation, my selected VALID date is 17/09/2014, so you can see both records fulfill that criteria (I'm doing the same filter on the BOOKINGFROM and BOOKINGTO fields too, as I want records that are valid and bookable on the same day). Both these records are valid, but I only want to display the COST from the last record (CONTRACTNUMBER 145).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need all the records in my datamodel, as users can select any VALID date. If they were to select the date 01/10/2014, then only one record is applicable (CONTRACTNUMBER 140)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I, in a straight table, only select the COST from the last applicable record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 12:33:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-17T12:33:56Z</dc:date>
    <item>
      <title>Select values from the last applicable record</title>
      <link>https://community.qlik.com/t5/QlikView/Select-values-from-the-last-applicable-record/m-p/719756#M258519</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;&lt;/P&gt;&lt;P&gt;I'm facing a particular problem, which is related to the godawful design of my source database (not me, I hasten to add!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have records that hold a numerical value (COST). Each record have VALIDFROM and VALIDTO date fields. I have to select a VALID date on my UI, and have the values where that date falls between VALIDFROM and VALIDTO displayed in a straight table. I managed to achieve this using a calculated dimension on my table where if this is true it results in a 1, if false it results in a null, and then I supress null values on this dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is the underlying DB and the application that populates that allows for multiple records to have the same or overlapping VALIDFROM and VALIDTO dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="66994" alt="qveg.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/66994_qveg.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this situation, my selected VALID date is 17/09/2014, so you can see both records fulfill that criteria (I'm doing the same filter on the BOOKINGFROM and BOOKINGTO fields too, as I want records that are valid and bookable on the same day). Both these records are valid, but I only want to display the COST from the last record (CONTRACTNUMBER 145).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need all the records in my datamodel, as users can select any VALID date. If they were to select the date 01/10/2014, then only one record is applicable (CONTRACTNUMBER 140)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I, in a straight table, only select the COST from the last applicable record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 12:33:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-values-from-the-last-applicable-record/m-p/719756#M258519</guid>
      <dc:creator />
      <dc:date>2014-09-17T12:33:56Z</dc:date>
    </item>
  </channel>
</rss>

