<?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: Firstsorted value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468886#M175140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an extract from the Reference Manual. Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsortedvalue ( [ distinct ] expression [, sort-weight [, n ]] )&lt;/P&gt;&lt;P&gt;returns the first value of expression sorted by corresponding sortweight&lt;/P&gt;&lt;P&gt;when expression is iterated over a number of records as&lt;/P&gt;&lt;P&gt;defined by a group by clause. Sort-weight should return a numeric&lt;/P&gt;&lt;P&gt;value where the lowest value will render the corresponding value of&lt;/P&gt;&lt;P&gt;expression to be sorted first. By preceding the sort-value expression&lt;/P&gt;&lt;P&gt;with a minus sign, the function will return the last value instead. If&lt;/P&gt;&lt;P&gt;more than one value of expression share the same lowest sort-order,&lt;/P&gt;&lt;P&gt;the function will return null. By stating an n larger than 1, you will&lt;/P&gt;&lt;P&gt;get the nth value in order. If the word distinct occurs before the&lt;/P&gt;&lt;P&gt;expression, all duplicates will be disregarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Load Customer,&lt;/P&gt;&lt;P&gt;firstsortedvalue(PurchasedArticle, OrderDate)as&lt;/P&gt;&lt;P&gt;FirstProductBought&lt;/P&gt;&lt;P&gt;from abc.csv group by Customer;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Dec 2012 17:46:51 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2012-12-27T17:46:51Z</dc:date>
    <item>
      <title>Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468885#M175139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi All,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the use of &lt;STRONG&gt;Firstsortedvalue()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please give me example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 16:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468885#M175139</guid>
      <dc:creator />
      <dc:date>2012-12-27T16:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468886#M175140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an extract from the Reference Manual. Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsortedvalue ( [ distinct ] expression [, sort-weight [, n ]] )&lt;/P&gt;&lt;P&gt;returns the first value of expression sorted by corresponding sortweight&lt;/P&gt;&lt;P&gt;when expression is iterated over a number of records as&lt;/P&gt;&lt;P&gt;defined by a group by clause. Sort-weight should return a numeric&lt;/P&gt;&lt;P&gt;value where the lowest value will render the corresponding value of&lt;/P&gt;&lt;P&gt;expression to be sorted first. By preceding the sort-value expression&lt;/P&gt;&lt;P&gt;with a minus sign, the function will return the last value instead. If&lt;/P&gt;&lt;P&gt;more than one value of expression share the same lowest sort-order,&lt;/P&gt;&lt;P&gt;the function will return null. By stating an n larger than 1, you will&lt;/P&gt;&lt;P&gt;get the nth value in order. If the word distinct occurs before the&lt;/P&gt;&lt;P&gt;expression, all duplicates will be disregarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Load Customer,&lt;/P&gt;&lt;P&gt;firstsortedvalue(PurchasedArticle, OrderDate)as&lt;/P&gt;&lt;P&gt;FirstProductBought&lt;/P&gt;&lt;P&gt;from abc.csv group by Customer;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 17:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468886#M175140</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2012-12-27T17:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468887#M175141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Hi Nagaraju,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;I've made two videos on FirstSortedValue()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;&lt;A class="loading active_link" href="http://qlikshare.com/392" title="http://qlikshare.com/392"&gt;http://qlikshare.com/392&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 18:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468887#M175141</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2012-12-27T18:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468888#M175142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Nagaraju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose you have data like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;xxx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P&gt;yyy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000&lt;/P&gt;&lt;P&gt;zzz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose if you want to get the name of salesperson who have highest then FirstSortedValue() will be useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Name, Aggr(-Sum(Sales), Name) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 18:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468888#M175142</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-12-27T18:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468889#M175143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the data is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;xxx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;yyy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;zzz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3000&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;mmm&amp;nbsp;&amp;nbsp;&amp;nbsp; 3000&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and you want to show at least one of the two highest i.e. either zzz or mmm, how can this be resolved ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 16:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468889#M175143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-11T16:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsorted value</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468890#M175144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Use this.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt;Name, Sales&lt;BR /&gt;xxx, 1000&lt;BR /&gt;yyy, 2000&lt;BR /&gt;zzz, 3000&lt;BR /&gt;mmm, 3000&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;Final:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RecNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Name1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Table1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 06:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsorted-value/m-p/468890#M175144</guid>
      <dc:creator />
      <dc:date>2015-05-08T06:39:07Z</dc:date>
    </item>
  </channel>
</rss>

