<?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: First Sorted Value - help with expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495002#M1127209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic, thank you so much. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew I was close, just couldn't fit the final jigsaw piece into place!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2014 15:29:21 GMT</pubDate>
    <dc:creator>ljackson</dc:creator>
    <dc:date>2014-02-26T15:29:21Z</dc:date>
    <item>
      <title>First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494997#M1127200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer (this is 5 digit numeric)&lt;/P&gt;&lt;P&gt;Sales_Rep&lt;/P&gt;&lt;P&gt;Top_100_Product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find out, for every Sales Rep, which customer is stocking the most Top 100 products.&amp;nbsp;&amp;nbsp; There are several products linked to each 'top 100 product' so I have tried to count by distinct 'top 100 product'.&amp;nbsp; &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;Customer&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;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Top 100 Product]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Sales_Rep]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The above expression returns the highest customer numerically in the list for each Sales Rep, not the one with the most Top 100 Products.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone see what I'm doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 12:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494997#M1127200</guid>
      <dc:creator>ljackson</dc:creator>
      <dc:date>2013-12-17T12:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494998#M1127201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is still an issue, I am struggling to find the right expressions to show, for each sales rep, which customer is stocking the most Top_100_Products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 13:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494998#M1127201</guid>
      <dc:creator>ljackson</dc:creator>
      <dc:date>2014-02-26T13:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494999#M1127202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Customer&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,-&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Top 100 Product]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;get you?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you could post a sample app demonstrating your problem and what your data looks like, that would be helpful. Are you using this in a straight table, what are the dimensions in your chart?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 14:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/494999#M1127202</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-26T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495000#M1127203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using that expression I get null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a dummy file (simplified) with identical dimensions/expressions.&amp;nbsp; I would appreciate if you could take a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495000#M1127203</guid>
      <dc:creator>ljackson</dc:creator>
      <dc:date>2014-02-26T15:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495001#M1127205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You almost had it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue([c-iname],-aggr(Count(DISTINCT [Top 100 Product]), [c-iname]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the expression, I didn't know if you wanted both customer and code, so I concatenated them like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue(CustCodeH,-aggr(Count(DISTINCT [Top 100 Product]), CustCodeH)) &amp;amp; ' ' &amp;amp; FirstSortedValue([c-iname],-aggr(Count(DISTINCT [Top 100 Product]), [c-iname]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find atached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495001#M1127205</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-26T15:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - help with expression</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495002#M1127209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic, thank you so much. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew I was close, just couldn't fit the final jigsaw piece into place!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-help-with-expression/m-p/495002#M1127209</guid>
      <dc:creator>ljackson</dc:creator>
      <dc:date>2014-02-26T15:29:21Z</dc:date>
    </item>
  </channel>
</rss>

