<?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 Load only row with max data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5553#M449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to load only the max date record with the following script -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Twitter]:&lt;/P&gt;&lt;P&gt;LOAD [company_name],&lt;/P&gt;&lt;P&gt;[positive_percent],&lt;/P&gt;&lt;P&gt;[negative_percent],&lt;/P&gt;&lt;P&gt;[neutral_percent],&lt;/P&gt;&lt;P&gt;[load_date]&lt;/P&gt;&lt;P&gt; FROM [lib://Desktop/Twitter.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right Join (Twitter)&lt;/P&gt;&lt;P&gt;LOAD [company_name],&lt;/P&gt;&lt;P&gt;Max([load_date]) as Date&lt;/P&gt;&lt;P&gt;Resident Twitter&lt;/P&gt;&lt;P&gt;Group by [company_name];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reload I am still getting all the rows (attached image)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am kind of stuck here. Is it because I have timestamp in my load_date field ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jan 2018 13:31:42 GMT</pubDate>
    <dc:creator>nehasaxena</dc:creator>
    <dc:date>2018-01-23T13:31:42Z</dc:date>
    <item>
      <title>Load only row with max data</title>
      <link>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5553#M449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to load only the max date record with the following script -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Twitter]:&lt;/P&gt;&lt;P&gt;LOAD [company_name],&lt;/P&gt;&lt;P&gt;[positive_percent],&lt;/P&gt;&lt;P&gt;[negative_percent],&lt;/P&gt;&lt;P&gt;[neutral_percent],&lt;/P&gt;&lt;P&gt;[load_date]&lt;/P&gt;&lt;P&gt; FROM [lib://Desktop/Twitter.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right Join (Twitter)&lt;/P&gt;&lt;P&gt;LOAD [company_name],&lt;/P&gt;&lt;P&gt;Max([load_date]) as Date&lt;/P&gt;&lt;P&gt;Resident Twitter&lt;/P&gt;&lt;P&gt;Group by [company_name];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reload I am still getting all the rows (attached image)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am kind of stuck here. Is it because I have timestamp in my load_date field ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 13:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5553#M449</guid>
      <dc:creator>nehasaxena</dc:creator>
      <dc:date>2018-01-23T13:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load only row with max data</title>
      <link>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5554#M450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Twitter]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD [company_name],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[positive_percent],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[negative_percent],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[neutral_percent],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[load_date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM [lib://Desktop/Twitter.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Right Join (Twitter)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD [company_name],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Max([load_date]) as &lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[load_date]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Resident Twitter&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group by [company_name];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 13:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5554#M450</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-23T13:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Load only row with max data</title>
      <link>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5555#M451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I think you're almost there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would make sure you format the date in the original table and the date in the right join the same. I imagine the date is coming through like you said as a timestamp, and the max(...) is returning a number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG style="color: #339966;"&gt;timestamp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #339966;"&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;Load_Date&lt;STRONG style=": ; color: #008000;"&gt;)&lt;/STRONG&gt; as Load_Date&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;from [...];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right join (xxx)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;company_name,&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #008000;"&gt;&lt;STRONG style="color: #339966;"&gt;timestamp&lt;/STRONG&gt;(&lt;/STRONG&gt;max(Load_Date)&lt;STRONG style=": ; color: #008000;"&gt;)&lt;/STRONG&gt; as Load_Date&lt;/P&gt;&lt;P&gt;REsident.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing you could try is the firstSortedValue() function, but you would need to repeat it for every field. This returns the first value, for a field in a specified sort order. You would need to group by company name, as this is an aggregated function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Company_Name,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;firstsortedvalue([positive_percent],Load_date) as positive_percent,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;firstsortedvalue([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;negative_percent&lt;/SPAN&gt;],Load_date) as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;negative_percent&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM [lib://Desktop/Twitter.xlsx]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GROUP BY Company_Name;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I prefer the "right join" solution though!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:18:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-only-row-with-max-data/m-p/5555#M451</guid>
      <dc:creator>ericasense</dc:creator>
      <dc:date>2018-01-23T15:18:27Z</dc:date>
    </item>
  </channel>
</rss>

