<?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 to find the last value. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267698#M399151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, you can try with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=FirstSortedValue(State,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(aggr(rank(-count([Constituency-code])),[State-code])))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Dec 2016 14:07:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-15T14:07:48Z</dc:date>
    <item>
      <title>FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267697#M399150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this expression to identify "the name of the State" that has "Maximum Contstituency":&lt;/P&gt;&lt;P&gt;=FirstSortedValue(State,(aggr(rank(count([Constituency-code])),[State-code])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when I want the reverse to find the name of the state that has "minimum Constituency", I use '&lt;SPAN style="color: #ff0000;"&gt;-ve&lt;/SPAN&gt;' sign:&lt;/P&gt;&lt;P&gt;=FirstSortedValue(State,&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;(aggr(rank(count([Constituency-code])),[State-code])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not return any value. I am not sure where I am doing wrong with FirstSortedValue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267697#M399150</guid>
      <dc:creator />
      <dc:date>2016-12-15T14:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267698#M399151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, you can try with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=FirstSortedValue(State,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(aggr(rank(-count([Constituency-code])),[State-code])))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267698#M399151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-15T14:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267699#M399152</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;I implemented what you mentioned but it too did not return any value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267699#M399152</guid>
      <dc:creator />
      <dc:date>2016-12-15T14:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267700#M399153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=FirstSortedValue(State,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(aggr(rank(count([Constituency-code])),[State-code])), count(distinct State))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267700#M399153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-15T14:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267701#M399154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= FirstSortedValue(State, -Aggr(only(Count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Constituency-code]&lt;/SPAN&gt;)),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[State-code], State&lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267701#M399154</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2016-12-15T14:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue to find the last value.</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267702#M399155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there more than one state where the Count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Constituency-code]) is the same? If that's true which State do you want? Randomly any or Concatenate the States to show all?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;For Randomly one, you can try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;- gives Max and +gives min&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MaxCount&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT State, -Aggr(Count(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Constituency-code]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[State-code], State&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MinCount&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT State, Aggr(Count(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Constituency-code]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[State-code], State&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-to-find-the-last-value/m-p/1267702#M399155</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-15T14:48:11Z</dc:date>
    </item>
  </channel>
</rss>

