<?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 Max and FirstSortedValue across two fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-and-FirstSortedValue-across-two-fields/m-p/81460#M13364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA my sample data. The requirement is fairly simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each [Transaction Reference] I want 1 row. | want the field value returned based on firstly the Max [CapitalFlag] then then Max [Nett Value]. i.e. No matter what the max Nett Value is the higher CapitalFlag (i.e. 8 not 1) will take presidence. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for this example it would be the second row. Even thought the Nett Value isn't highest the Capital Flag is higher (8 not 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="maxvalues2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/192986_maxvalues2.PNG" style="height: 152px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I started with this script but it takes into account just the Nett Value, not the CapitalFlag&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;IMG alt="maxvalues.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192967_maxvalues.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Feb 2018 14:40:24 GMT</pubDate>
    <dc:creator>shane_spencer</dc:creator>
    <dc:date>2018-02-09T14:40:24Z</dc:date>
    <item>
      <title>Max and FirstSortedValue across two fields</title>
      <link>https://community.qlik.com/t5/QlikView/Max-and-FirstSortedValue-across-two-fields/m-p/81460#M13364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA my sample data. The requirement is fairly simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each [Transaction Reference] I want 1 row. | want the field value returned based on firstly the Max [CapitalFlag] then then Max [Nett Value]. i.e. No matter what the max Nett Value is the higher CapitalFlag (i.e. 8 not 1) will take presidence. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for this example it would be the second row. Even thought the Nett Value isn't highest the Capital Flag is higher (8 not 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="maxvalues2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/192986_maxvalues2.PNG" style="height: 152px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I started with this script but it takes into account just the Nett Value, not the CapitalFlag&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;IMG alt="maxvalues.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/192967_maxvalues.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 14:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-and-FirstSortedValue-across-two-fields/m-p/81460#M13364</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2018-02-09T14:40:24Z</dc:date>
    </item>
  </channel>
</rss>

