<?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 Help!! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703480#M253744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want status value&amp;nbsp; with the max date().&lt;/P&gt;&lt;P&gt;There is grouping at the table based in ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2014 14:21:17 GMT</pubDate>
    <dc:creator>sujeetsingh</dc:creator>
    <dc:date>2014-10-10T14:21:17Z</dc:date>
    <item>
      <title>FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703469#M253733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am stuck up with an expression in straight table:&lt;/P&gt;&lt;P&gt;I have data as below&lt;/P&gt;&lt;P&gt;ID, Date&amp;nbsp;&amp;nbsp; ,Status1&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Status2&lt;/P&gt;&lt;P&gt;1 , 2/10/2011, A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , B&lt;/P&gt;&lt;P&gt;1, 3/11/3011&amp;nbsp; , B&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G&lt;/P&gt;&lt;P&gt;1,&amp;nbsp; 4/11/2012,L&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,L&lt;/P&gt;&lt;P&gt;1,&amp;nbsp; 5/12/2012 ,A&amp;nbsp; ,H&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using expression as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;aggr(FirstSortedValue([Status1], -[RowNo()]), ID) but gives value L but it should give the latest value&amp;nbsp; A with latest date '5/12/2012'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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, 10 Oct 2014 13:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703469#M253733</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T13:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703470#M253734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=aggr(FirstSortedValue([Status1], -Date), ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 13:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703470#M253734</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703471#M253735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use the value of [Date] as second parameter to FirstSortedValue, instead of RowNo()? IMHO RowNo() will in this case give unpredictable results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 13:39:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703471#M253735</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-10T13:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703472#M253736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try creating the RowNo inside the script. and then using it in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 13:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703472#M253736</guid>
      <dc:creator />
      <dc:date>2014-10-10T13:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703473#M253737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not works&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 13:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703473#M253737</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T13:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703474#M253738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry can not do this in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 13:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703474#M253738</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T13:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703475#M253739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Status1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703475#M253739</guid>
      <dc:creator />
      <dc:date>2014-10-10T14:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703476#M253740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leave the expressions&amp;nbsp; ....just what i want is &lt;/P&gt;&lt;P&gt;Straight table with ID as dimension&lt;/P&gt;&lt;P&gt;I want Status1 with latest date aggregated on per ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:08:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703476#M253740</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T14:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703477#M253741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when there is Status1 as null then again a value with latest date then it is taking the one with null value for Status1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703477#M253741</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703478#M253742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put ID as dimension in your table, and =max(Date) as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that in all cases, including this one, Date has to exist as a Field, not just a column label in your table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703478#M253742</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-10T14:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703479#M253743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to accept the distinct even the expression editor flags it. This will give you 'A'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue( distinct Total &amp;lt;ID&amp;gt;&amp;nbsp; Status1, -Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/68691_Capture.PNG.png" style="width: 620px; height: 333px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703479#M253743</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-10T14:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703480#M253744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want status value&amp;nbsp; with the max date().&lt;/P&gt;&lt;P&gt;There is grouping at the table based in ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703480#M253744</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-10T14:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703481#M253745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Status1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Status1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'*'}-{''}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:28:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703481#M253745</guid>
      <dc:creator />
      <dc:date>2014-10-10T14:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703482#M253746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, then FirstSortedValue will still be your hero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="FirstSortedValueHelp.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/68696_FirstSortedValueHelp.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See doc below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703482#M253746</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-10T14:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703483#M253747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW dates in the year 3011 are still far away. But in the example I copied them anyway in sets for IDs 5 and 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 14:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703483#M253747</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-10T14:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703484#M253748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter thanks, for you all reply.&lt;/P&gt;&lt;P&gt;Actually i have Dimension as First name , Last name which is one to one related to ID.&lt;/P&gt;&lt;P&gt;In that case the expressions gives some wrong data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 06:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703484#M253748</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-11T06:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703485#M253749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;curious... any luck with this expression ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 17:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703485#M253749</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-11T17:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue Help!!</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703486#M253750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the answer &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/632028"&gt;Re: Expression Help&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 04:09:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Help/m-p/703486#M253750</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-10-14T04:09:56Z</dc:date>
    </item>
  </channel>
</rss>

