<?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: Field value corresponding to highest possible value of another field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454923#M487554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if this was misleading: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FirstSortedValue([Project Status], -Cal_ID)&lt;/EM&gt; will indeed return the Project Status for the &lt;EM&gt;highest &lt;/EM&gt;Cal_ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;EM&gt;&lt;A name="kanchor237"&gt;&lt;/A&gt;&lt;A name="firstsortedvalue"&gt;&lt;/A&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;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;STRONG&gt; &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. &lt;/STRONG&gt;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;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 17:28:18 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-01-24T17:28:18Z</dc:date>
    <item>
      <title>Field value corresponding to highest possible value of another field</title>
      <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454920#M487551</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 really hope somebody can help me here. I thought this was going to be simple to do but am apparently missing something... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached .qvw I have a straight table where I'm trying to show Status, Completion and Revenue values for each Project but only where Cal_ID has the highest possible value for each specific Project and within the current selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using set analysis along with a max(Cal_ID) variable but that doesn't seem to work. I've also tried several combinations with aggr and rank but that didn't crack it either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is how the staight table should look in the end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Project&lt;/TD&gt;&lt;TD&gt;Project Status&lt;/TD&gt;&lt;TD&gt;Completion to Month End (Fixed)&lt;/TD&gt;&lt;TD&gt;Fixed Revenue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project A&lt;/TD&gt;&lt;TD&gt;Completed&lt;/TD&gt;&lt;TD&gt;100,00%&lt;/TD&gt;&lt;TD&gt;€ 12.500,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project B&lt;/TD&gt;&lt;TD&gt;Completed&lt;/TD&gt;&lt;TD&gt;100,00%&lt;/TD&gt;&lt;TD&gt;€ 30.000,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project C&lt;/TD&gt;&lt;TD&gt;Ongoing&lt;/TD&gt;&lt;TD&gt;50,00%&lt;/TD&gt;&lt;TD&gt;€ 18.224,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project D&lt;/TD&gt;&lt;TD&gt;Ongoing&lt;/TD&gt;&lt;TD&gt;92,00%&lt;/TD&gt;&lt;TD&gt;€ 249.432,36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project E&lt;/TD&gt;&lt;TD&gt;Ongoing&lt;/TD&gt;&lt;TD&gt;95,00%&lt;/TD&gt;&lt;TD&gt;€ 15.992,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Project F&lt;/TD&gt;&lt;TD&gt;Completed&lt;/TD&gt;&lt;TD&gt;100,00%&lt;/TD&gt;&lt;TD&gt;€ 12.950,00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 16:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454920#M487551</guid>
      <dc:creator />
      <dc:date>2013-01-24T16:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Field value corresponding to highest possible value of another field</title>
      <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454921#M487552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FirstSortedValue() function to get the latest values with respect to Cal_ID, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FirstSortedValue([Project Status], -Cal_ID)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454921#M487552</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-01-24T17:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field value corresponding to highest possible value of another field</title>
      <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454922#M487553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I really need is the highest Cal_ID to be picked, which is not necessarily the latest. Does this function pick the highest? Sorry, I've never used it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454922#M487553</guid>
      <dc:creator />
      <dc:date>2013-01-24T17:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field value corresponding to highest possible value of another field</title>
      <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454923#M487554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if this was misleading: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FirstSortedValue([Project Status], -Cal_ID)&lt;/EM&gt; will indeed return the Project Status for the &lt;EM&gt;highest &lt;/EM&gt;Cal_ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;EM&gt;&lt;A name="kanchor237"&gt;&lt;/A&gt;&lt;A name="firstsortedvalue"&gt;&lt;/A&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;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;STRONG&gt; &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. &lt;/STRONG&gt;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;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454923#M487554</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-01-24T17:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field value corresponding to highest possible value of another field</title>
      <link>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454924#M487555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 17:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-value-corresponding-to-highest-possible-value-of-another/m-p/454924#M487555</guid>
      <dc:creator />
      <dc:date>2013-01-24T17:33:32Z</dc:date>
    </item>
  </channel>
</rss>

