<?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 FirstSortedValue with double values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609564#M477444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Who can help me solving this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a script to select the value of the lowest Koers and the highest Koers&lt;/P&gt;&lt;P&gt;It works correct as long there are no double Koers values&lt;/P&gt;&lt;P&gt;If there is a double Value I want to select the latest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateMaxKoers&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FirstSortedValue(Date, -Koers) AS DateMaxKoers&lt;/P&gt;&lt;P&gt;Resident Koersen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FirstSortedValue(Date, Koers) AS DateMinKoers&lt;/P&gt;&lt;P&gt;Resident Koersen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect&amp;nbsp;&amp;nbsp;&amp;nbsp; as DateMaxKoers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16-04-2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,95&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as DateMinKoers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14-04-2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,75&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="64"&gt;Date&lt;/TD&gt;&lt;TD class="xl66" width="64"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Koers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17"&gt;17-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;"&gt;11,91&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;16-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;15-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,84&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;14-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;11,75&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;11-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,83&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;10-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,76&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;09-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;08-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;11,75&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;07-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;"&gt;11,94&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for thinking with me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 07:57:57 GMT</pubDate>
    <dc:creator>r_vdbraak</dc:creator>
    <dc:date>2014-04-23T07:57:57Z</dc:date>
    <item>
      <title>FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609564#M477444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Who can help me solving this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a script to select the value of the lowest Koers and the highest Koers&lt;/P&gt;&lt;P&gt;It works correct as long there are no double Koers values&lt;/P&gt;&lt;P&gt;If there is a double Value I want to select the latest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateMaxKoers&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FirstSortedValue(Date, -Koers) AS DateMaxKoers&lt;/P&gt;&lt;P&gt;Resident Koersen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FirstSortedValue(Date, Koers) AS DateMinKoers&lt;/P&gt;&lt;P&gt;Resident Koersen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect&amp;nbsp;&amp;nbsp;&amp;nbsp; as DateMaxKoers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16-04-2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,95&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as DateMinKoers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14-04-2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11,75&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="64"&gt;Date&lt;/TD&gt;&lt;TD class="xl66" width="64"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Koers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17"&gt;17-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;"&gt;11,91&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;16-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;15-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,84&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;14-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;11,75&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;11-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,83&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;10-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,76&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;09-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11,77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;08-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;11,75&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="17" style="border-top: none;"&gt;07-04-2014&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;"&gt;11,94&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for thinking with me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 07:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609564#M477444</guid>
      <dc:creator>r_vdbraak</dc:creator>
      <dc:date>2014-04-23T07:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609565#M477445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using &lt;STRONG&gt;distinct&lt;/STRONG&gt; like:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; FirstSortedValue( &lt;STRONG&gt;Distinct&lt;/STRONG&gt; Date, Koers) AS DateMinKoers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't worry about syntax error red mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 08:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609565#M477445</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-23T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609566#M477446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Treseco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your helpful thinking.&lt;/P&gt;&lt;P&gt;Using Distinct gives me a value, but it is the first date (08-04-2014) in stead of the last date (14-04-2014)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gr. Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 08:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609566#M477446</guid>
      <dc:creator>r_vdbraak</dc:creator>
      <dc:date>2014-04-23T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609567#M477447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;User the Order By clause to change the order of load , like:&lt;/P&gt;&lt;P&gt;Temp: &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Date,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Koers&lt;BR /&gt;17-04-2014, 11.91&lt;BR /&gt;16-04-2014, 11.95&lt;BR /&gt;15-04-2014, 11.84&lt;BR /&gt;14-04-2014, 11.75&lt;BR /&gt;11-04-2014, 11.83&lt;BR /&gt;10-04-2014, 11.76&lt;BR /&gt;09-04-2014, 11.77&lt;BR /&gt;08-04-2014, 11.75&lt;BR /&gt;07-04-2014, 11.94&lt;BR /&gt;];&lt;BR /&gt;Fin:&lt;BR /&gt;Load&lt;BR /&gt; FirstSortedValue(distinct Date, Koers) as FSV&lt;BR /&gt;Resident Temp &lt;STRONG&gt;order by &lt;/STRONG&gt;Date asc;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 08:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609567#M477447</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-23T08:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609568#M477448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Treseco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use &lt;STRONG style="text-decoration: underline;"&gt;Order by Date desc &lt;/STRONG&gt;I got what I expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gr. Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The complete script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; FirstSortedValue(Date, Koers) AS DateMinKoers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Koersen&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order by Date desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 08:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609568#M477448</guid>
      <dc:creator>r_vdbraak</dc:creator>
      <dc:date>2014-04-23T08:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue with double values</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609569#M477449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example for you with calculations in the script and on the fly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 08:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-with-double-values/m-p/609569#M477449</guid>
      <dc:creator />
      <dc:date>2014-04-23T08:51:34Z</dc:date>
    </item>
  </channel>
</rss>

