<?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 all fields for max date only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1651378#M730693</link>
    <description>&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the delay. This actually resolved by not loading the comments fields, and grouped by the requestID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 12:46:46 GMT</pubDate>
    <dc:creator>Qlik_ULG</dc:creator>
    <dc:date>2019-11-26T12:46:46Z</dc:date>
    <item>
      <title>Load all fields for max date only</title>
      <link>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1643269#M730691</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running into some trouble where I need to take the maximum possible value for one field, and take all columns for only that one row within a table. I want to load the&amp;nbsp; request_id, comments and date, but only for the max date, as this field can have multiple values which is skewing calculations.&lt;/P&gt;&lt;P&gt;I need to do this multiple times, because there are different status_id's in the table and then rejoin these rows back to each other to create a new table at the end with just the maximum values together, using the unique identifier request_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the load script that I currently have;&lt;/P&gt;&lt;P&gt;TEMP_STATUS_HISTORY_Assigned:&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;status_history_id &amp;nbsp; AS [sh id],&lt;/P&gt;&lt;P&gt;//status_id As [Status ID]&lt;/P&gt;&lt;P&gt;request_id,&lt;BR /&gt;comments,&lt;BR /&gt;creation_date&lt;BR /&gt;&lt;BR /&gt;FROM [STATUS_table.qvd](qvd)&lt;BR /&gt;WHERE status_id = 2;&lt;BR /&gt;&lt;BR /&gt;STATUS_HISTORY_Assigned:&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;request_id&amp;nbsp;&amp;nbsp; AS [request ID],&lt;BR /&gt;comments AS [Assigned Comment],&lt;BR /&gt;date(creation_date) AS [Assigned Date]&lt;BR /&gt;Resident&lt;BR /&gt;TEMP_STATUS_HISTORY_Assigned;&lt;BR /&gt;&lt;BR /&gt;inner join (STATUS_HISTORY_Assigned)&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;[request ID],&lt;BR /&gt;Date(Max([Assigned Date]),'MM/DD/YYYY') AS [Assigned Date]&lt;BR /&gt;Resident STATUS_HISTORY_Assigned&lt;BR /&gt;group by [request ID];&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;drop&lt;/STRONG&gt; table TEMP_STATUS_HISTORY_Assigned;&lt;BR /&gt;&lt;BR /&gt;STATUS_HISTORY:&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;[request ID],&lt;BR /&gt;[Assigned Comment],&lt;BR /&gt;[Assigned Date]&lt;BR /&gt;Resident&lt;BR /&gt;STATUS_HISTORY_Assigned;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am then running this same script segment again, but for a different status_id number, which is given a different name also - ie status_id = 5 which is Signed_Off.&amp;nbsp;I then want to join these new fields back to the last table created&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join(STATUS_HISTORY)&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;[request ID],&lt;BR /&gt;[Signed Off Comment],&lt;BR /&gt;[Signed Off Date]&lt;BR /&gt;Resident&lt;BR /&gt;STATUS_HISTORY_Signed_Off;&lt;/P&gt;&lt;P&gt;________________________________________________________________________________&lt;/P&gt;&lt;P&gt;When I run this script for all of my status_ids and try to create one new table at the end, with only the maximum values in order to create calculations on these dates, I am getting an error. It is the error saying 'Assigned Date field not found' when I debug the script. When I run through this script with only one status_id, it runs through fine but once I add in extra different status_ids and different date names, the error resurfaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why it is failing to pick up this field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1643269#M730691</guid>
      <dc:creator>Qlik_ULG</dc:creator>
      <dc:date>2024-11-16T19:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Load all fields for max date only</title>
      <link>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1643461#M730692</link>
      <description>&lt;P&gt;Do you have a sample app?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 00:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1643461#M730692</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-11-06T00:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Load all fields for max date only</title>
      <link>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1651378#M730693</link>
      <description>&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the delay. This actually resolved by not loading the comments fields, and grouped by the requestID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 12:46:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-all-fields-for-max-date-only/m-p/1651378#M730693</guid>
      <dc:creator>Qlik_ULG</dc:creator>
      <dc:date>2019-11-26T12:46:46Z</dc:date>
    </item>
  </channel>
</rss>

