<?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 NULL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339280#M494129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use MinString or MaxString in that case&lt;/P&gt;&lt;P&gt;MaxString({&amp;lt;Date={"$(Max(Date))"}&amp;gt;} Field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Apr 2012 12:04:55 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2012-04-05T12:04:55Z</dc:date>
    <item>
      <title>firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339279#M494128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using firstSortedValue but it doesn't work because some of my data has the same "order" and so it returns me null.&lt;/P&gt;&lt;P&gt;Is there a way to "emulate" firstSortedValue with data havaing the same order ? So instead of returning null it'll return the first result of the set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 11:30:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339279#M494128</guid>
      <dc:creator />
      <dc:date>2012-04-05T11:30:05Z</dc:date>
    </item>
    <item>
      <title>firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339280#M494129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use MinString or MaxString in that case&lt;/P&gt;&lt;P&gt;MaxString({&amp;lt;Date={"$(Max(Date))"}&amp;gt;} Field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 12:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339280#M494129</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-05T12:04:55Z</dc:date>
    </item>
    <item>
      <title>firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339281#M494130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, tried that but it doesn't seem to work, the results are empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I used :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinString({&amp;lt;productDate={"$(Max(productDate))"}&amp;gt;} totalProductPrice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;productDate and totalProductPrice come from the same table and are filtred by a "productID".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 13:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339281#M494130</guid>
      <dc:creator />
      <dc:date>2012-04-05T13:45:18Z</dc:date>
    </item>
    <item>
      <title>firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339282#M494131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you Post your FirstSortedValue expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 13:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339282#M494131</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-05T13:47:27Z</dc:date>
    </item>
    <item>
      <title>firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339283#M494132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try with this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MinString({&amp;lt;productDate={'$(=Date(Max(productDate)))'}&amp;gt;} totalProductPrice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 13:48:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339283#M494132</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-05T13:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339284#M494133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on your rule for selecting from the duplicate sort values. You can add the DISTINCT keyword and you'll get the first value by load order. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date, Value&lt;/P&gt;&lt;P&gt;1/1, 100&lt;/P&gt;&lt;P&gt;1/1, 150&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=firstsortedvalue(DISTINCT Value, Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;will return 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have another rule, such as highest/lowest value, don't use DISTINCT but modify sort value with a bias of the Value itself.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=firstsortedvalue(Value, Date+(Value/1000000))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;will return 150. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note tha the bias does not have to come from the Value -- it could be calculated on any other connected field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 17:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339284#M494133</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-04-05T17:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339285#M494134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that's what I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it before but it seems that QlikView doesn't recognize the "distinct" keyword and think it's a syntax error but it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 07:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339285#M494134</guid>
      <dc:creator />
      <dc:date>2012-04-06T07:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339286#M494135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;Another question about FirstSortedValue:&lt;/P&gt;&lt;P&gt;What if the first parameter in FirstSortedValue function is string? so we can't use (Value / 1000000) as types are not compatible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Globaly the problem is that we (my project) will definitely have duplicate records which we need to sort. And everytime FirstSortedValue sees duplicate it returns NULL. If we put DISTINCT keyword in this function we'll get a reduced number of records what is not acceptable. Is there a way to implement sorting in expressions without this function? or in a completely different way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 15:07:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339286#M494135</guid>
      <dc:creator />
      <dc:date>2013-01-11T15:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339287#M494136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post some sample data and your desired result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 07:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339287#M494136</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-01-22T07:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339288#M494137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For instance we have 3 students Aaa, Bbb, Ccc. Aaa has 5 Scores, Bbb and Ccc have 4. In table view:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Student Score&lt;/P&gt;&lt;P&gt;Aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 &lt;/P&gt;&lt;P&gt;Bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Ccc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we don't use DISTINCT we get empt.&lt;/P&gt;&lt;P&gt;If we use FirstSortedValue with DISTINCT we get the following results:&lt;/P&gt;&lt;P&gt;Student Score&lt;/P&gt;&lt;P&gt;Bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a student Ccc is gone, as he has the same Score as Bbb and we only take distinct here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And we want to have all the records sorted as usual and also have all the original records in place.&lt;/P&gt;&lt;P&gt;So like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Student Score&lt;/P&gt;&lt;P&gt;Ccc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Bbb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;Aaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alphabet sorting is irrelevant now, we just need to keep the identical records in place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 09:44:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339288#M494137</guid>
      <dc:creator />
      <dc:date>2013-01-22T09:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339289#M494138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to display just the max score for each student? In that case, use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=max(Score)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I understanding your requirement?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 16:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339289#M494138</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-01-22T16:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339290#M494139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. &lt;/P&gt;&lt;P&gt;For my example: there are 3 students. I want those 3 students sorted by thier Score value.&lt;/P&gt;&lt;P&gt;If you implement that with FirstSortedValue without DISTINCT you won't get anything as a result.&lt;/P&gt;&lt;P&gt;If you implement that with DISTINCT you get only two different records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need to avoid described situations, becuase we definitely will have identical scores for students and I don't to loose any of them and more over I want to work at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember how sorting works in MySQL for instance. You have a table with 3 records. You sort this table and you get all 3 records even if there identical values in those records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it make any sense?:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 16:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339290#M494139</guid>
      <dc:creator />
      <dc:date>2013-01-22T16:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339291#M494140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check on the ORDER BY-statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 17:00:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339291#M494140</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2013-01-22T17:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339292#M494141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK Order By statement is suitable for a script, not for expression.&lt;/P&gt;&lt;P&gt;And I need to provide sorting functionality at runtime, when script has already been run, that means in expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 17:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339292#M494141</guid>
      <dc:creator />
      <dc:date>2013-01-22T17:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339293#M494142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about sorting the column by expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 17:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339293#M494142</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-01-22T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: firstSortedValue NULL</title>
      <link>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339294#M494143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The thing is I need to sort the collection of data, not the table object by it column. &lt;/P&gt;&lt;P&gt;Basically what I want: There is a collection with 3 items, I need to sort it with qlikview and return the result one record at a time, just like a FirstSortedValue has a third parameter, which indicates the index inside the sorted collection. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 17:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstSortedValue-NULL/m-p/339294#M494143</guid>
      <dc:creator />
      <dc:date>2013-01-22T17:40:09Z</dc:date>
    </item>
  </channel>
</rss>

