<?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: Checking for duplicate primary keys and only displaying recent dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412254#M1154010</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can load the data like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Customer_id, Max(Date) as Date from xyz group by Customer_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Apr 2013 09:37:36 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2013-04-02T09:37:36Z</dc:date>
    <item>
      <title>Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412252#M1154008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is kind of a double header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say I've got a customer account, with a relevant primary key (A customer ID). This customer then closes the account, but later reopens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep a record of all this and when it happens.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Lets say the customer ID is 25.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now I have a record involving:&lt;/P&gt;&lt;P&gt;25 - Open - January 12th 2012&lt;/P&gt;&lt;P&gt;25 - Closed - August 25th 2012&lt;/P&gt;&lt;P&gt;25 - Reopen - January 15th 2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want to display/load the most recent status of that customers account (The reopen on Jan 15th).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I go about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An if loop in the script, some expression in a chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Joe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 09:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412252#M1154008</guid>
      <dc:creator />
      <dc:date>2013-04-02T09:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412253#M1154009</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;Try using LastValue() function. That might help in your case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 09:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412253#M1154009</guid>
      <dc:creator />
      <dc:date>2013-04-02T09:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412254#M1154010</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can load the data like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Customer_id, Max(Date) as Date from xyz group by Customer_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 09:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412254#M1154010</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-04-02T09:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412255#M1154011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm going to out myself as a bit of an idiot here, but what would xyz group refer to in this case?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm using an access database via ODBC if this changes the syntax at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And would I put that on the line where I would usually load the field Customer, or seperately from it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for anymore help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 09:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412255#M1154011</guid>
      <dc:creator />
      <dc:date>2013-04-02T09:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412256#M1154012</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my example XYZ is nothing but the table from which you will be fetching the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are trying to get the data from database, Try below Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sql Select Customer_id, Max(Date) As Date from Table_Name Group by Customer_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here Date field is the Field where you have Dates in record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 09:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412256#M1154012</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-04-02T09:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for duplicate primary keys and only displaying recent dates</title>
      <link>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412257#M1154013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing, thank you for the swift and well explained help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This forum is insanely responsive &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 10:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Checking-for-duplicate-primary-keys-and-only-displaying-recent/m-p/412257#M1154013</guid>
      <dc:creator />
      <dc:date>2013-04-02T10:08:52Z</dc:date>
    </item>
  </channel>
</rss>

