<?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 Need help in understanding FirstSortedValue in diagrams in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106321#M912308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I need to display the most frequent event per week.&lt;/P&gt;&lt;P&gt;The data are weeks with dates on which a certain event (A,B,C,D) occurs.&lt;/P&gt;&lt;P&gt;My understanding was that I create a simple table with 'week' as dimension and the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({$}Event, - aggr(count({$} Event),Event))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured that the dimension would work like the 'group by' in the manual, so that I count the number of a specific event per week, sorted it descending per week and get the string of the most frequent event.&lt;/P&gt;&lt;P&gt;Turns out that is works when I define a week but that it doesnt work when no week is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why and what would be the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a little example for illustration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always: Thanks for any help and for your interest,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>andreas_koehler</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106321#M912308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I need to display the most frequent event per week.&lt;/P&gt;&lt;P&gt;The data are weeks with dates on which a certain event (A,B,C,D) occurs.&lt;/P&gt;&lt;P&gt;My understanding was that I create a simple table with 'week' as dimension and the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({$}Event, - aggr(count({$} Event),Event))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured that the dimension would work like the 'group by' in the manual, so that I count the number of a specific event per week, sorted it descending per week and get the string of the most frequent event.&lt;/P&gt;&lt;P&gt;Turns out that is works when I define a week but that it doesnt work when no week is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why and what would be the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a little example for illustration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always: Thanks for any help and for your interest,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106321#M912308</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106322#M912309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({$}Event, - aggr(count({$} Event),Week,Event))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:18:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106322#M912309</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T12:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106323#M912310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have ties in your count of events per week, you can also use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat( Aggr(If( Rank(Count(Event),1) = 1,Event),Week,Event),', ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to show all events with the same max count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106323#M912310</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T12:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106324#M912311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan is there a way we can use Concat with FirstSortedValue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106324#M912311</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T12:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106325#M912312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan,&lt;/P&gt;&lt;P&gt;I guess you can hear my 'AGGR !!' when you open your window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106325#M912312</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-06-01T12:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106326#M912313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, not sure if I understand your question (wasn't there a similar question in a thread we both participated some weeks ago?), could you please elaborate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 13:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106326#M912313</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T13:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106327#M912314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You know how you used Concat with the Rank function to create more than one event (based on the count). I was wondering if we can somehow use the Concat with FirstSortedValue. I have tried doing this multiple times, but have never been successful. Is this something which is not possible to do, or am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 13:39:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106327#M912314</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T13:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106328#M912315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was referring to&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1008439"&gt;Re: FirstSortedValue()_Multiple dimension values with same count&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this is what you are looking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 13:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106328#M912315</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T13:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106329#M912316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am unable to replicate your orginial Concat(...Rank..)) expression. What am I missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue( Aggr(Concat(DISTINCT Event, ','), Week, Event),-Aggr(Count(Event),Week, Event))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126516_Capture.PNG" style="height: 83px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 13:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106329#M912316</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T13:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106330#M912317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, you are referring the other thread's winning expression, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;=FirstSortedValue( Aggr(Concat(DISTINCT EmployeeID, ','),YearlyIncome),-Aggr(YearlyIncome,YearlyIncome))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the Concat() is already grouped by the ranking measure, something we would need to calculate (and that's hard to do in the aggr() dimensions...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 14:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106330#M912317</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T14:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106331#M912318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering if that expression can be replicated in this thread's scenario. I think I won't over-populating this discussion and will create another thread of what I am thinking of doing.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks Stefan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Sunny &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 14:06:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106331#M912318</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T14:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in understanding FirstSortedValue in diagrams</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106332#M912319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;thanks for this inspiration.&lt;/P&gt;&lt;P&gt;I used it to add expressions that concat and count the events that meet a certain threshold level of occurrences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 15:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-understanding-FirstSortedValue-in-diagrams/m-p/1106332#M912319</guid>
      <dc:creator>andreas_koehler</dc:creator>
      <dc:date>2016-06-01T15:49:46Z</dc:date>
    </item>
  </channel>
</rss>

