<?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 Latest information for a customer only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281810#M499207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a straight table you could add a calulated dimension along the lines of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(not isnull(aggr(max([Date of Account Name change]), [Meter No])), [Account Name])&lt;/P&gt;&lt;P&gt;and then ensure you tick the option 'Suppress When Value Is Null'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add a expression of '=1'.&amp;nbsp; You can then hide the expresssion column on the presentation tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other way would be to create a flag in the script that shows which Account name is the latest.&lt;/P&gt;&lt;P&gt;Create a mapping table by grouping your second table above by Account Name and Max(Date Of Account Name Change)&amp;nbsp; Map this back into the second table.&amp;nbsp; You can then compate the 2 dates and show which is the latest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jul 2011 16:44:45 GMT</pubDate>
    <dc:creator>jedgson</dc:creator>
    <dc:date>2011-07-14T16:44:45Z</dc:date>
    <item>
      <title>Latest information for a customer only</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281809#M499206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to capture information in a straight table that will show the amount of real losses for our system. Basically if I do a count of the below customers who have left my company it will say I have lost 4 (this is based on a distinct count of the meter nos.), however if I put this information into a table box or straight table it will bring up 6 records due to the account name being different on 2 of the meter nos. I have provided another table that links to the first table and this shows the date of which the account names were changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in a straight table I really want to only show the losses with the most up to date account name, e.g. for Meter No, A12345 I want to see that only Mr Joe Bloggs left my company on 20/08/10, rather than Mr Joe Bloggs and Joe Bloggs leaving on the same date. I'm hoping that something can be done with the date of account name change field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need any clarification around this just ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Ralph&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 50%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Meter No.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Account Name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Loss Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A12345&lt;/TD&gt;&lt;TD&gt;Joe Bloggs&lt;/TD&gt;&lt;TD&gt;20/08/10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A12345&lt;/TD&gt;&lt;TD&gt;Mr Joe Bloggs&lt;/TD&gt;&lt;TD&gt;20/08/10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B23456&lt;/TD&gt;&lt;TD&gt;Mrs Wright&lt;/TD&gt;&lt;TD&gt;30/10/10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C34567&lt;/TD&gt;&lt;TD&gt;Mr Wrong&lt;/TD&gt;&lt;TD&gt;22/12/10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C34567&lt;/TD&gt;&lt;TD&gt;Mr John Wrong&lt;/TD&gt;&lt;TD&gt;22/12/10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D45678&lt;/TD&gt;&lt;TD&gt;Mrs Smith&lt;/TD&gt;&lt;TD&gt;05/02/11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 50%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Account Name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date of Account Name change&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Joe Bloggs&lt;/TD&gt;&lt;TD&gt;06/02/05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mr Joe Bloggs&lt;/TD&gt;&lt;TD&gt;08/04/09&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mrs Wright&lt;/TD&gt;&lt;TD&gt;02/05/04&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mr Wrong&lt;/TD&gt;&lt;TD&gt;01/05/06&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mr John Wrong&lt;/TD&gt;&lt;TD&gt;03/07/08&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mrs Smith&lt;/TD&gt;&lt;TD&gt;05/05/05&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281809#M499206</guid>
      <dc:creator />
      <dc:date>2011-07-14T16:20:55Z</dc:date>
    </item>
    <item>
      <title>Latest information for a customer only</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281810#M499207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a straight table you could add a calulated dimension along the lines of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(not isnull(aggr(max([Date of Account Name change]), [Meter No])), [Account Name])&lt;/P&gt;&lt;P&gt;and then ensure you tick the option 'Suppress When Value Is Null'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add a expression of '=1'.&amp;nbsp; You can then hide the expresssion column on the presentation tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other way would be to create a flag in the script that shows which Account name is the latest.&lt;/P&gt;&lt;P&gt;Create a mapping table by grouping your second table above by Account Name and Max(Date Of Account Name Change)&amp;nbsp; Map this back into the second table.&amp;nbsp; You can then compate the 2 dates and show which is the latest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281810#M499207</guid>
      <dc:creator>jedgson</dc:creator>
      <dc:date>2011-07-14T16:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Latest information for a customer only</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281811#M499208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this problem is one of the kind "slowly changing dimension". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might consider to have a look at the intervalmatch function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But probably this is too much for that kind of your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may try as expression&lt;/P&gt;&lt;P&gt;=FirstSortedValue([Account Name], -1*date#([Date of Account Name change],'DD/MM/YY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get only the latest account name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. date# is only needed in case [Date of ...] is not recognized as date format (as on my system).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nachricht geändert durch swuehl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 16:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-information-for-a-customer-only/m-p/281811#M499208</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-14T16:55:23Z</dc:date>
    </item>
  </channel>
</rss>

