<?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 firstsortedvalue with group by? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236844#M860896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;P&gt;Need find &lt;SPAN style="color: #3a3a3a; font-family: 'Open Sans', sans-serif; font-size: 14px;"&gt;the Best Color with the &lt;/SPAN&gt;&lt;SPAN style="color: #3a3a3a; font-size: 14px; font-family: 'Open Sans', sans-serif; text-decoration: underline; font-weight: bold;"&gt;highest&lt;/SPAN&gt;&lt;SPAN style="color: #3a3a3a; font-family: 'Open Sans', sans-serif; font-size: 14px;"&gt; Sold Qty for each Product.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i did is,&lt;/P&gt;&lt;P&gt;used below expression and able to get the best color by product wise&lt;/P&gt;&lt;P&gt;=firstsortedvalue(Color,-aggr(sum(SoldQty),Product,Color))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue:&lt;/P&gt;&lt;P&gt;If two color in same rank then it's showing null. is there anyway to resolve it? or just show any of one color instead of null?&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="149237" alt="Best Color.jpg" class="jive-image image-1" src="/legacyfs/online/149237_Best Color.jpg" style="height: 309px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>devarasu07</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>firstsortedvalue with group by?</title>
      <link>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236844#M860896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;P&gt;Need find &lt;SPAN style="color: #3a3a3a; font-family: 'Open Sans', sans-serif; font-size: 14px;"&gt;the Best Color with the &lt;/SPAN&gt;&lt;SPAN style="color: #3a3a3a; font-size: 14px; font-family: 'Open Sans', sans-serif; text-decoration: underline; font-weight: bold;"&gt;highest&lt;/SPAN&gt;&lt;SPAN style="color: #3a3a3a; font-family: 'Open Sans', sans-serif; font-size: 14px;"&gt; Sold Qty for each Product.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i did is,&lt;/P&gt;&lt;P&gt;used below expression and able to get the best color by product wise&lt;/P&gt;&lt;P&gt;=firstsortedvalue(Color,-aggr(sum(SoldQty),Product,Color))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue:&lt;/P&gt;&lt;P&gt;If two color in same rank then it's showing null. is there anyway to resolve it? or just show any of one color instead of null?&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="149237" alt="Best Color.jpg" class="jive-image image-1" src="/legacyfs/online/149237_Best Color.jpg" style="height: 309px; width: 620px;" /&gt;&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/firstsortedvalue-with-group-by/m-p/1236844#M860896</guid>
      <dc:creator>devarasu07</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: firstsortedvalue with group by?</title>
      <link>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236845#M860897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT Aggr(If(Sum(SoldQty) = Max(TOTAL &amp;lt;Product&amp;gt; Aggr(Sum(SoldQty), Product, Color)), Color), Product, Color), ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 10:48:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236845#M860897</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-12T10:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: firstsortedvalue with group by?</title>
      <link>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236846#M860898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For any one color, you can use FirstSortedValue() function with DISTINCT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=firstsortedvalue(&lt;SPAN style="color: #ff0000;"&gt;distinct&lt;/SPAN&gt; Color,-aggr(sum(SoldQty),Product,Color))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 10:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236846#M860898</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-12T10:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: firstsortedvalue with group by?</title>
      <link>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236847#M860899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also you can try the below expression: ( One of Sunny's post inspired me with this expression ). Hope this helps...&lt;/P&gt;&lt;P&gt;=firstsortedvalue(Color,-aggr(sum(SoldQty) + Rank([Color])/1E10,Product,Color))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 11:00:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsortedvalue-with-group-by/m-p/1236847#M860899</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-01-12T11:00:22Z</dc:date>
    </item>
  </channel>
</rss>

