<?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 - Repeat Rows / Rank Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8426#M606222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt; Quick question though - is the use of 1E2 and 1E10 by way of scaling the results so when they are combined you get the correct order? I.e. 1E2 makes the month figure large and /1E10 makes the amount small? &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are absolutely correct &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 11:05:05 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-04-24T11:05:05Z</dc:date>
    <item>
      <title>First Sorted Value - Repeat Rows / Rank Issue</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8423#M606219</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;&lt;/P&gt;&lt;P&gt;I have found most of the solution to the below problem from other community pages but am struggling with the final part, help would be much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a table which shows the sequence of investment by clients using a historical track record month by month. The first part of the challenge was to remove repeat values (using DISTINCT in FirstSortedValue) but now I have the issue that in some months there are two new investments and I think the FSV is unable to tell between them. I would be happy to rank them within the month by the size but this is where I fail. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abridged example of the input data (in bold example of the first situation where there is a repeat value) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="288" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 705px; height: 246px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;CLIENT&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;MONTH&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;PROD&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;AMOUNT&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/05/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;EQ&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 211,720 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;ACCOUNT&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;01/06/2016&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;CM&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,312,114 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/06/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;EQ&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 582,959 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;ACCOUNT&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;01/06/2016&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;FI&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,300,500&lt;/STRONG&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/07/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;CM&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,267,931 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/07/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;EQ&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 604,172 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/07/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;FI&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,296,814 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/08/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;CM&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,268,735 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/08/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;EQ&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 629,561 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/08/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;FI&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,293,994 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/09/2016&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;CM&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,269,440 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In setting this up I created a sub table with just the min values which makes me thing the rank is the problem based on RANK function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="120" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="height: 60px; width: 702px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;CLIENT&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;PROD&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;SUM(AMOUNT)&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;MIN_MONTH&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;RANK&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;EQ&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;7,643,942&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/05/2016&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;CM&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;27,634,989&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/06/2016&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2-3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;FI&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;26,143,488&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/06/2016&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2-3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17" style="border-top: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;MF&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3,863,171&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;01/10/2016&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center; color: #575757; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an output I am trying to create a new table with the first, second and third investments made, using the code: &lt;/P&gt;&lt;P&gt;First Value Example:&lt;/P&gt;&lt;P&gt;FirstSortedValue(&lt;/P&gt;&lt;P&gt;DISTINCT PROD,&lt;/P&gt;&lt;P&gt;AGGR(MIN(MONTH),PROD, CLIENT),&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second Value Example: &lt;/P&gt;&lt;P&gt;FirstSortedValue(&lt;/P&gt;&lt;P&gt;DISTINCT PROD,&lt;/P&gt;&lt;P&gt;AGGR(MIN(MONTH),PROD, CLIENT),&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this example, I would expect the result table to look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;CLIENT&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;First Invest&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Second Invest&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Third Invest&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Fourth Invest&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;ACCOUNT&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;EQ&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;CM&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;FI&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;MF&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may be totally off track and there is an easier way to do this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 08:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8423#M606219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-24T08:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - Repeat Rows / Rank Issue</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8424#M606220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(DISTINCT PROD, Aggr(((Min(MONTH)*1E2)-(Sum(AMOUNT)/1E10)),PROD, CLIENT), 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8424#M606220</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-24T09:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - Repeat Rows / Rank Issue</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8425#M606221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny - that does work! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quick question though - is the use of 1E2 and 1E10 by way of scaling the results so when they are combined you get the correct order? I.e. 1E2 makes the month figure large and /1E10 makes the amount small? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8425#M606221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-24T09:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Value - Repeat Rows / Rank Issue</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8426#M606222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt; Quick question though - is the use of 1E2 and 1E10 by way of scaling the results so when they are combined you get the correct order? I.e. 1E2 makes the month figure large and /1E10 makes the amount small? &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are absolutely correct &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 11:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Value-Repeat-Rows-Rank-Issue/m-p/8426#M606222</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-24T11:05:05Z</dc:date>
    </item>
  </channel>
</rss>

