<?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: FirstSortedValue() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1724215#M724985</link>
    <description>&lt;P&gt;If the other partners suggested worked, we would appreciate it if you would close out the thread by using the Accept as Solution button on that post to mark things.&amp;nbsp; This will give them credit for the assistance and let the other Community Members know it helped.&amp;nbsp; If you did something different, you can post that and then mark that post, and if you still require assistance, please leave an update post.&lt;/P&gt;&lt;P&gt;You can also search the Design Blog area for further potential ideas too:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2020 19:29:39 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-07-01T19:29:39Z</dc:date>
    <item>
      <title>FirstSortedValue()</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1709284#M724983</link>
      <description>&lt;P&gt;I have two Tables:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Table 1 (Tax):&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;ID&lt;BR /&gt;DateFrom&lt;BR /&gt;Percent&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Table 2 (Invoice):&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;InvNr&lt;BR /&gt;InvDate&lt;BR /&gt;Amount&lt;BR /&gt;TaxID&lt;/P&gt;&lt;P&gt;The Problem I have is, that I need the Percent from Table 1 where table1.ID=table2.TaxID and the last Date where table1.DateFrom&amp;lt;=table2.InvDate&lt;/P&gt;&lt;P&gt;In SQL I would describe it as:&lt;/P&gt;&lt;P&gt;select&lt;BR /&gt;table1.Percent&lt;BR /&gt;from table1, table2&lt;BR /&gt;where table1.ID=table2.TaxID and table1.DateFrom&amp;lt;=table2.InvDate&lt;BR /&gt;order by table1.DateFrom desc Limit 1&lt;/P&gt;&lt;P&gt;but I have no idea how to say it in QlikView.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1709284#M724983</guid>
      <dc:creator>Volker</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1709296#M724984</link>
      <description>&lt;P&gt;You can use IntervalMatch() function. More info &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/LoadData/matching-intervals-to-discrete-data.htm" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IntervalTable:

LOAD Key, ValidFrom, Team from IntervalTable.xls;

NullAsValue FirstDate,LastDate;

 

Key:

LOAD

Key,

ValidFrom as FirstDate,

date(if(Key=previous(Key),

previous(ValidFrom) - 1)) as LastDate,

Team

RESIDENT IntervalTable order by Key, ValidFrom desc;

 

drop table IntervalTable;

 

Transact:

LOAD Key, Name, Date, Sales from Transact.xls;

 

INNER JOIN intervalmatch (Date,Key) LOAD FirstDate, LastDate, Key RESIDENT Key;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 08:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1709296#M724984</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2020-06-09T08:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1724215#M724985</link>
      <description>&lt;P&gt;If the other partners suggested worked, we would appreciate it if you would close out the thread by using the Accept as Solution button on that post to mark things.&amp;nbsp; This will give them credit for the assistance and let the other Community Members know it helped.&amp;nbsp; If you did something different, you can post that and then mark that post, and if you still require assistance, please leave an update post.&lt;/P&gt;&lt;P&gt;You can also search the Design Blog area for further potential ideas too:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 19:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/1724215#M724985</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-01T19:29:39Z</dc:date>
    </item>
  </channel>
</rss>

