<?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: small function like in Excel? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411807#M153309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is much more powerful function firstsortedvalue():&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;firstsortedvalue(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[{set_expression}][ &lt;SPAN class="Bold"&gt;distinct&lt;/SPAN&gt; ] [ &lt;SPAN class="Bold"&gt;total&lt;/SPAN&gt; [&amp;lt;fld {, fld}&amp;gt;]] expression [, sort_weight [, n]]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;returns the first value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; sorted by corresponding &lt;SPAN class="Italic"&gt;sort-weight&lt;/SPAN&gt; when &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; is iterated over the chart dimension(s). &lt;SPAN class="Italic"&gt;Sort-weight&lt;/SPAN&gt; should return a numeric value where the lowest value will render the corresponding value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; to be sorted first. By preceding the &lt;SPAN class="Italic"&gt;sort-value&lt;/SPAN&gt; expression with a minus sign, the function will return the last value instead. If more than one value of expression share the same lowest &lt;SPAN class="Italic"&gt;sort-order&lt;/SPAN&gt;, the function will return null. By stating an n larger than 1, you will get the nth value in order.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Just use the same field for both &lt;SPAN class="Italic"&gt;expression and &lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;sort_weight parameters. &lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Oct 2012 18:15:57 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-10-13T18:15:57Z</dc:date>
    <item>
      <title>small function like in Excel?</title>
      <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411805#M153307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to get something like the "small function" in Excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F.e. if you have these numbers:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="23433" class="jive-image" alt="example.jpg" src="https://community.qlik.com/legacyfs/online/23433_example.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Excel, small(num,4) = 3&lt;/P&gt;&lt;P&gt;in Qlikview(11), min(num,4) = 5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 16:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411805#M153307</guid>
      <dc:creator />
      <dc:date>2012-10-13T16:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: small function like in Excel?</title>
      <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411806#M153308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; min function is working like small.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what's your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 16:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411806#M153308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-13T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: small function like in Excel?</title>
      <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411807#M153309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is much more powerful function firstsortedvalue():&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;firstsortedvalue(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[{set_expression}][ &lt;SPAN class="Bold"&gt;distinct&lt;/SPAN&gt; ] [ &lt;SPAN class="Bold"&gt;total&lt;/SPAN&gt; [&amp;lt;fld {, fld}&amp;gt;]] expression [, sort_weight [, n]]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;returns the first value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; sorted by corresponding &lt;SPAN class="Italic"&gt;sort-weight&lt;/SPAN&gt; when &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; is iterated over the chart dimension(s). &lt;SPAN class="Italic"&gt;Sort-weight&lt;/SPAN&gt; should return a numeric value where the lowest value will render the corresponding value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; to be sorted first. By preceding the &lt;SPAN class="Italic"&gt;sort-value&lt;/SPAN&gt; expression with a minus sign, the function will return the last value instead. If more than one value of expression share the same lowest &lt;SPAN class="Italic"&gt;sort-order&lt;/SPAN&gt;, the function will return null. By stating an n larger than 1, you will get the nth value in order.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Just use the same field for both &lt;SPAN class="Italic"&gt;expression and &lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;sort_weight parameters. &lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 18:15:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411807#M153309</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-10-13T18:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: small function like in Excel?</title>
      <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411808#M153310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Excel there is an order of cells in range.&lt;/P&gt;&lt;P&gt;You could add order as separate field and use it for sorting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;A, B, num, order&lt;/P&gt;&lt;P&gt;a1, bb, 1, 1&lt;/P&gt;&lt;P&gt;a2, bb, 2, 2&lt;/P&gt;&lt;P&gt;a3, bb, 3, 3&lt;/P&gt;&lt;P&gt;a4, bb, 3, 4&lt;/P&gt;&lt;P&gt;a5, bb, 3, 5&lt;/P&gt;&lt;P&gt;a6, bb, 5, 6&lt;/P&gt;&lt;P&gt;a7, bb, 5, 7&lt;/P&gt;&lt;P&gt;a8, bb, 6, 8&lt;/P&gt;&lt;P&gt;a9, bb, 7, 9&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just use =firstsortedvalue(num, order, 4)&lt;/P&gt;&lt;P&gt;A bit ugly but haven't got anything more.&lt;/P&gt;&lt;P&gt;Maybe it would be better to ask the real question, not just how to replace the Excel function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2012 16:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411808#M153310</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-10-14T16:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: small function like in Excel?</title>
      <link>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411809#M153311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help, I already got it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I just used firstsortedvalue(num,num,n) then in this case it gives a null value for the 3's and 5's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way I got it to work is by using firstsortedvalue(num,num+date/100000000,n)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case my dates were formated like yyyymmdd. So this way each record has a unique value, and therefore you don't run into problems when you have values that occur more than once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 07:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/small-function-like-in-Excel/m-p/411809#M153311</guid>
      <dc:creator />
      <dc:date>2012-10-15T07:59:04Z</dc:date>
    </item>
  </channel>
</rss>

