<?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: Re: FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737219#M263655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="null.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/70215_null.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Oct 2014 09:33:08 GMT</pubDate>
    <dc:creator>simondachstr</dc:creator>
    <dc:date>2014-10-31T09:33:08Z</dc:date>
    <item>
      <title>FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737209#M263645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the enclosed QVW file, I want to have Customer Having Maximum and Minimum Number of Invoices... I can get the Customer name who has Maximum Number of Invoices by using FirstSortedValue function but when I use the same function to achieve Customer with Minimum Number of Invoices, I am not getting any data... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know where I am wrong...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737209#M263645</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-30T22:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737210#M263646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can't find it, but if it's any help, when you make a selection of values ​​if that works, unless there are two equal values ​​in both Max and Min&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737210#M263646</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-10-30T22:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737211#M263647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FirstSortedValue(Customer, Aggr(Count(DISTINCT InvoNo),Customer))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will return null because that's the first sorted value. Check your straight table, untick Suppress Zero-Values &amp;amp; Suppress Missing and it will make sense to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A workaround would be either&lt;/P&gt;&lt;P&gt;a) use FirstSortedValue(Customer, Aggr(Count(DISTINCT InvoNo),Customer),2)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;b) Use Set analysis to exclude null e.g. &lt;/P&gt;&lt;P&gt;FirstSortedValue({&amp;lt;Customer=P({$})&amp;gt;} Customer, Aggr(Count(DISTINCT InvoNo),Customer))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:20:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737211#M263647</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2014-10-30T22:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737212#M263648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I remember, the Aggr() advanced aggregation table inside your FirstSortedValue() function will consider a customer NULL with a zero distinct count, which is the minimum in the table. It might work forcing QV to only consider customers with a value, like attached. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737212#M263648</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-10-30T22:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737213#M263649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Min and Max, there are no equal values....Customer A is having Minimum number of Invoices i.e. 53&lt;/P&gt;&lt;P&gt;Customer D is having Maximum Number of Invoices i.e. 85&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 07:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737213#M263649</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-31T07:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737214#M263650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin, Thanks for your reply.&lt;/P&gt;&lt;P&gt;Yes, I already tried with FirstSortedValue with 2 before posting and it's working but my confusion is why it's not working with FirstSortedValue with 1 (default).&lt;/P&gt;&lt;P&gt;I have tried... unticking Suppress Zero Values (Presentation Tab) and Suppress When Value is Null (Dimension Tab) but I can't see any customer having Zero Value invoices...&lt;/P&gt;&lt;P&gt;Let me have the QVW file if you find something which I am missing...&lt;/P&gt;&lt;P&gt;FirstSortedValue function, I have used many times for getting min and max but this time, it's giving me headache.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 07:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737214#M263650</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-31T07:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737215#M263651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Stefen, Thanks for your reply... But I couldn't find any customer having Zero Count Invoices... I have already achieved the result using the expression you have provided but curious to know what is wrong with this data set which is forcing us to use Customer = {"*"} inside FirstSortedValue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 07:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737215#M263651</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-31T07:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737216#M263652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One issue I found that this problem started only after I created Master Calendar for &lt;STRONG&gt;InvoDate.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there anything from Master Calendar is wrong which is forcing the FirstSortedValue to consider null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 07:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737216#M263652</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-31T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737217#M263653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is caused by the AGGR function. It will evaluate Count(Distinct InvoNo) for all possible values of Customer. In your case the data model creates a Missing value (Null()) with count 0. This will be your minimum value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, to get around this you have to filter the Customer-dimension in the outer aggregation function like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue({&amp;lt;Customer={"=Count(distinct InvoNo)&amp;gt;0"}&amp;gt;}Customer, Aggr(Count(DISTINCT InvoNo),Customer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you A as the answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 09:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737217#M263653</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-31T09:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737218#M263654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Default is outer join in Qlikview&lt;/STRONG&gt; which created null customers for dates present only in Master calendar table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scroll to bottom of table box in attached qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 09:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737218#M263654</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-31T09:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737219#M263655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="null.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/70215_null.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 09:33:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737219#M263655</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2014-10-31T09:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737220#M263656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all for your help.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 10:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/737220#M263656</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-31T10:17:39Z</dc:date>
    </item>
  </channel>
</rss>

