<?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 firstsorted value for two dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257436#M496358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the firstsorted value function; I know that this function returns null value if there are two different values responding to the ranking criteria so I am trying to use two ranking criteria; My exoression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsorted value ( Data_value,&lt;/P&gt;&lt;P&gt;// first criteria &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( aggr ( min ( criteria ) , dim1, dim2 , dim3 ),&lt;/P&gt;&lt;P&gt;//second criteria &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - ( aggr ( sum ( volumes ) , dim1, dim2, dim3 ...))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview does not show me any error but it doesn't work; could you please give me some help???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN lang="IT"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="IT"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Nov 2011 08:15:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-26T08:15:40Z</dc:date>
    <item>
      <title>firstsorted value for two dimension</title>
      <link>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257436#M496358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the firstsorted value function; I know that this function returns null value if there are two different values responding to the ranking criteria so I am trying to use two ranking criteria; My exoression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsorted value ( Data_value,&lt;/P&gt;&lt;P&gt;// first criteria &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( aggr ( min ( criteria ) , dim1, dim2 , dim3 ),&lt;/P&gt;&lt;P&gt;//second criteria &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - ( aggr ( sum ( volumes ) , dim1, dim2, dim3 ...))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview does not show me any error but it doesn't work; could you please give me some help???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN lang="IT"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="IT"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 08:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257436#M496358</guid>
      <dc:creator />
      <dc:date>2011-11-26T08:15:40Z</dc:date>
    </item>
    <item>
      <title>firstsorted value for two dimension</title>
      <link>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257437#M496359</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;I think it's not possible with firstSortedValue because this function returns a single value for just one row. &lt;/P&gt;&lt;P&gt;Maybe in the script ?&lt;/P&gt;&lt;P&gt;Could you post a sample of your data.&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 08:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257437#M496359</guid>
      <dc:creator />
      <dc:date>2011-11-26T08:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: firstsorted value for two dimension</title>
      <link>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257438#M496360</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;here is what i read -&lt;/P&gt;&lt;P&gt; "&lt;/P&gt;&lt;P&gt;&lt;A class="dropspot" id="a17"&gt;firstsortedvalue&lt;/A&gt;( &lt;SPAN style="font-style: italic;"&gt;[ &lt;/SPAN&gt;distinct&lt;SPAN style="font-style: italic;"&gt; ] expression [, sort-weight [, n ]]&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;returns the first value of &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt; sorted by corresponding &lt;SPAN style="font-style: italic;"&gt;sort-weight&lt;/SPAN&gt; when &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt; is iterated over a number of records as defined by a &lt;SPAN style="font-weight: bold;"&gt;group by&lt;/SPAN&gt; clause. &lt;SPAN style="font-style: italic;"&gt;Sort-weight&lt;/SPAN&gt; should return a numeric value where the lowest value will render the corresponding value of &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt; to be sorted first. By preceding the &lt;SPAN style="font-style: 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 &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt; share the same lowest &lt;SPAN style="font-style: italic;"&gt;sort-order&lt;/SPAN&gt;, the function will return NULL. By stating an &lt;SPAN style="font-style: italic;"&gt;n&lt;/SPAN&gt; larger than 1, you will get the &lt;SPAN style="font-style: italic;"&gt;n&lt;/SPAN&gt;th value in order. If the word &lt;SPAN style="font-weight: bold;"&gt;distinct&lt;/SPAN&gt; occurs before the &lt;SPAN style="font-style: italic;"&gt;expression&lt;/SPAN&gt;, all duplicates will be disregarded.&lt;/P&gt;&lt;P&gt;" from HELP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so probably your second criteria is being treated as [, n] here, that is it is supposed to return the nth value in order (preceding with '-' sign leaving it with nothing as output- while its a numeric value causing it with NO ERROR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its purely what i guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp; tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2011 09:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/firstsorted-value-for-two-dimension/m-p/257438#M496360</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-11-26T09:00:28Z</dc:date>
    </item>
  </channel>
</rss>

