<?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: Adding a field with latest value and date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238486#M855426</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It still seems that you have marked your response as correct here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/152659_Capture.PNG" style="height: 156px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2017 17:40:26 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-02-09T17:40:26Z</dc:date>
    <item>
      <title>Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238481#M855421</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 have 2 tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8pt;"&gt;Visit:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; Patient, VisitDate&lt;BR /&gt; 1,2014-12-18&lt;BR /&gt; 1,2015-04-09&lt;BR /&gt; 1,2015-05-14&lt;BR /&gt; 2,2014-01-24&lt;BR /&gt; 2,2014-07-25&lt;BR /&gt; 2,2015-01-23&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; ACR:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; Patient, ACRDate, ACR&lt;BR /&gt; 1,2014-08-12,24.1&lt;BR /&gt; 1,2014-12-03,36.5 &lt;BR /&gt; 1,2015-04-02,12.8 &lt;BR /&gt; 1,2015-04-30,11.3&lt;BR /&gt; 2,2014-01-17,41&lt;BR /&gt; 2,2014-07-21,43.2&lt;BR /&gt; 2,2016-01-21,34.4&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each visit I need to know what the last&amp;nbsp; ACR prior to the visit was and when.&lt;BR /&gt;I would like to attach 2 columns to table Visit: LastACRDate and LastACR.&lt;/P&gt;&lt;P&gt;So the Visit table will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Patient&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;VisitDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;LastACR&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;LastACRDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-12-18&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;36.5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-12-03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2015-04-09&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12.8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2015-04-02&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2015-05-14&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11.3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2015-04-30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-01-24&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;41&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-01-17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-07-25&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;43.2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-07-21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2015-01-23&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;43.2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2014-07-21&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you kindly for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238481#M855421</guid>
      <dc:creator>marunio007</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238482#M855422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Visit:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Patient, VisitDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2014-12-18&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2015-04-09&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2015-05-14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2014-01-24&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2014-07-25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2015-01-23&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACR:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Patient, ACRDate, ACR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2014-08-12,24.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2014-12-03,36.5 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2015-04-02,12.8 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1,2015-04-30,11.3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2014-01-17,41&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2014-07-21,43.2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2,2016-01-21,34.4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Visit)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Patient,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(ACRDate + IterNo() - 1) as VisitDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ACR as LastACR,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ACRDate as LastACRDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While ACRDate + IterNo() - 1 &amp;lt;= EndDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(If(Patient = Previous(Patient), Previous(ACRDate) - 1, Today())) as EndDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident ACR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Patient, ACRDate desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table ACR;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/152494_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 20:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238482#M855422</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-08T20:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238483#M855423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is so clever.&lt;/P&gt;&lt;P&gt;It works!&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238483#M855423</guid>
      <dc:creator>marunio007</dc:creator>
      <dc:date>2017-02-09T16:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238484#M855424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you mean to mark response as correct? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238484#M855424</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T17:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238485#M855425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did. The approval delay played a role here....&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:32:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238485#M855425</guid>
      <dc:creator>marunio007</dc:creator>
      <dc:date>2017-02-09T17:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238486#M855426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It still seems that you have marked your response as correct here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/152659_Capture.PNG" style="height: 156px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238486#M855426</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T17:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238487#M855427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marek, You marked your comment as Correct Response? Did you get the resolution already before Sunny helped you? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:41:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238487#M855427</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-02-09T17:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238488#M855428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies to the both of you.- mistake corrected (I hope)&lt;/P&gt;&lt;P&gt;I promise improvement in my next thread...&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 18:29:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238488#M855428</guid>
      <dc:creator>marunio007</dc:creator>
      <dc:date>2017-02-09T18:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field with latest value and date</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238489#M855429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologize not accepted &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. Just kidding!! Didn't want to harass, but the idea is that others can benefit when they land on this page. Seeing a thanks as the correct response is not very helpful and that's why I harassed you to mark the correct response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 18:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-with-latest-value-and-date/m-p/1238489#M855429</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T18:36:57Z</dc:date>
    </item>
  </channel>
</rss>

