<?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: How to get a prescriber with maximum value (FirstSortedValue), independent of selections in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473953#M557746</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({&amp;lt;Prescriber=&amp;gt;} Prescriber, -Aggr(Sum({&amp;lt;Prescriber=&amp;gt;}TRx), Prescriber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2013 21:35:21 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-06-14T21:35:21Z</dc:date>
    <item>
      <title>How to get a prescriber with maximum value (FirstSortedValue), independent of selections</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473952#M557745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a sample qvw (attached) in which I am trying to get the prescriber with maximum TRx. I am using FirstSortedValue function for satisfying the requirement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;However, I want this text to be independent of the prescriber selection. For instance, if P1, P2, P3 and P4 exist in the data and P4 is the prescriber with max TRx, how can I keep P4 as the top prescriber even when P1 and P2 are selected ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="196"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;Prescriber&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;TRx&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;P1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;P2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;P3&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;P4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The top prescriber is obtained with expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Prescriber, -Aggr(Sum(TRx), Prescriber))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Puneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 21:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473952#M557745</guid>
      <dc:creator />
      <dc:date>2013-06-14T21:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a prescriber with maximum value (FirstSortedValue), independent of selections</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473953#M557746</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({&amp;lt;Prescriber=&amp;gt;} Prescriber, -Aggr(Sum({&amp;lt;Prescriber=&amp;gt;}TRx), Prescriber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 21:35:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473953#M557746</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-06-14T21:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a prescriber with maximum value (FirstSortedValue), independent of selections</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473954#M557747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you ! I had tried putting Prescriber= inside sum within aggr, but wasn't aware that firstsortedvalue accepts set analysis as an argument too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 21:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-a-prescriber-with-maximum-value-FirstSortedValue/m-p/473954#M557747</guid>
      <dc:creator />
      <dc:date>2013-06-14T21:38:56Z</dc:date>
    </item>
  </channel>
</rss>

