<?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: find firstsortedvalue (or minstring) from table per customerid in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419172#M95491</link>
    <description>&lt;P&gt;table:&lt;BR /&gt;load * inline [&lt;BR /&gt;company,start_item,employeeid, year,ordered_key&lt;BR /&gt;34402,8521273,2021229,2013,34402_2021229_2013&lt;BR /&gt;34402,8521273,2021229,2014,34402_2021229_2014&lt;BR /&gt;34402,8521273,2021229,2015,34402_2021229_2015&lt;BR /&gt;34402,8521273,2021229,2017,34402_2021229_2017&lt;BR /&gt;34402,8521275,2021229,2012,34402_2021229_2012&lt;BR /&gt;34402,8559208,2021229,2016,34402_2021229_2016&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;find_first_value:&lt;BR /&gt;load&lt;BR /&gt;company &amp;amp; '_'&amp;amp; employeeid as employee_key,&lt;BR /&gt;firstsortedvalue(distinct start_item, ordered_key) as first_value&lt;BR /&gt;Resident table&lt;BR /&gt;group by company &amp;amp; '_' &amp;amp; employeeid;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2024 08:59:20 GMT</pubDate>
    <dc:creator>curiousfellow</dc:creator>
    <dc:date>2024-02-15T08:59:20Z</dc:date>
    <item>
      <title>find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2418879#M95459</link>
      <description>&lt;P&gt;I have a table containing customerid, valuefield and a sortfield that contains a string&lt;/P&gt;
&lt;P&gt;Now I want per customerid the valuefield where the sortfield has the lowest value , seems simple but I get an error&lt;/P&gt;
&lt;P&gt;this is my script:&lt;/P&gt;
&lt;P&gt;table:&lt;/P&gt;
&lt;P&gt;load customerid,&lt;/P&gt;
&lt;P&gt;firstsortedvalue(valuefield,sortfield)&lt;/P&gt;
&lt;P&gt;resident table 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table2 is sorted by customerid and sortfield&lt;/P&gt;
&lt;P&gt;Please hepl me with this, I struggle for several hours now but do not see what I am doing wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advande&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2418879#M95459</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-02-14T15:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2418911#M95460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In script you nedd a group by clause when using firstsortedvalue&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;load customerid,&lt;/P&gt;
&lt;P&gt;firstsortedvalue(valuefield,sortfield)&lt;/P&gt;
&lt;P&gt;resident table 2 group by&amp;nbsp;customerid ;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 16:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2418911#M95460</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2024-02-14T16:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419123#M95482</link>
      <description>&lt;P&gt;Unfortunately it still does not work. I get a null value where I expect the value of the lowest year.&lt;/P&gt;
&lt;P&gt;Please have a look at attatched file&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 08:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419123#M95482</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-02-15T08:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419149#M95487</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am not able to open the .qvw you shared.&lt;/P&gt;
&lt;P&gt;Could you please share an example of the DATA ? And the expected result ?&lt;/P&gt;
&lt;P&gt;Then I can try on my own.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 08:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419149#M95487</guid>
      <dc:creator>Antoine04</dc:creator>
      <dc:date>2024-02-15T08:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419154#M95488</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48508"&gt;@curiousfellow&lt;/a&gt; how about as below?&lt;/P&gt;
&lt;P&gt;FirstValue(start_item) as first_value&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;FirstSortedValue(DISTINCT start_item,&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;SubField(ordered_key,'_',2)&lt;/STRONG&gt;&lt;/FONT&gt;) as first_value&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 08:53:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419154#M95488</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2024-02-15T08:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419170#M95490</link>
      <description>&lt;P&gt;The result is wrong. The result is the start_item of 2013 while it should be the startitem of 2012.&lt;/P&gt;
&lt;P&gt;start_item of 2013 is lower than the start_item of 2012.&lt;/P&gt;
&lt;P&gt;Seems to work when I first sort the table, strange what is the function of sort_weight then ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try this in my original QVW and let you know&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 09:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419170#M95490</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-02-15T09:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: find firstsortedvalue (or minstring) from table per customerid</title>
      <link>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419172#M95491</link>
      <description>&lt;P&gt;table:&lt;BR /&gt;load * inline [&lt;BR /&gt;company,start_item,employeeid, year,ordered_key&lt;BR /&gt;34402,8521273,2021229,2013,34402_2021229_2013&lt;BR /&gt;34402,8521273,2021229,2014,34402_2021229_2014&lt;BR /&gt;34402,8521273,2021229,2015,34402_2021229_2015&lt;BR /&gt;34402,8521273,2021229,2017,34402_2021229_2017&lt;BR /&gt;34402,8521275,2021229,2012,34402_2021229_2012&lt;BR /&gt;34402,8559208,2021229,2016,34402_2021229_2016&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;find_first_value:&lt;BR /&gt;load&lt;BR /&gt;company &amp;amp; '_'&amp;amp; employeeid as employee_key,&lt;BR /&gt;firstsortedvalue(distinct start_item, ordered_key) as first_value&lt;BR /&gt;Resident table&lt;BR /&gt;group by company &amp;amp; '_' &amp;amp; employeeid;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 08:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/find-firstsortedvalue-or-minstring-from-table-per-customerid/m-p/2419172#M95491</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-02-15T08:59:20Z</dc:date>
    </item>
  </channel>
</rss>

