<?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: ApplyMap with Max in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442169#M432626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was using your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MapID2Company:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MAPPING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Klucz_Mandant_Nr_osobowy AS IndexValue,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;JG_skrót, -&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Data_zwolnienia) AS TranslationValue&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;RESIDENT Facts&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;GROUP BY &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Klucz_Mandant_Nr_osobowy;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And it is no working unfortunately - there is null value for ID_number 600-0000002 and should be Company "JICT". &lt;BR /&gt;You wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;if there are multiple possible company values for the same date&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;unfortunately here I have this issue so FirstSortedValue will not work…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Best wishes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Jacek Antek&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Oct 2017 10:52:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-12T10:52:37Z</dc:date>
    <item>
      <title>ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442163#M432620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have table with 3 fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID_number (Klucz_Mandant_Nr_osobowy) Company (JG_skrót) and Date_of_Fire (Data_zwolnienia).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each Id_number can be a few companies and for each companies can be few Dates. &lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;600-000002,&amp;nbsp; Company 1, Date - 2017-09-25&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;600-000002,&amp;nbsp; &lt;/SPAN&gt;Company 2, Date - &lt;SPAN style="font-size: 13.3333px;"&gt;2015-01-02&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now i want to have the result in apply map as :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;600-000002, Company 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Company 1 has date greater then Company2 so the applymap should take the first one (max date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help,&lt;/P&gt;&lt;P&gt;Jacek Antek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 08:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442163#M432620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T08:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442164#M432621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/AggregationFunctions/firstsorted.htm"&gt;FirstSortedValue()&lt;/A&gt;&lt;/SPAN&gt; aggregation function. Being an aggregation function, you will need a GROUP BY clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Dates are real QlikView dates (i.e. dual values), they can be used to numerically order companies. Your Mapping table creation load then becomes somthing similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MapID2Company:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MAPPING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;Klucz_Mandant_Nr_osobowy AS IndexValue,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(&lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;JG_skrót, -&lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;Data_zwolnienia) AS TranslationValue&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;RESIDENT Facts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;GROUP BY &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;Klucz_Mandant_Nr_osobowy;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442164#M432621</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-12T09:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442165#M432622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, but this is not working for me with your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result (Aktualna = &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;TranslationValue) is empty &lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;for 600-0000002. There is a lot of Fire_dates and maybe this is a problem?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;IMG alt="qlik.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/179387_qlik.png" style="height: 204px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Image is for code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Max_Spolki_nazwy_skrot:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Klucz_Mandant_Nr_osobowy,&lt;/P&gt;&lt;P&gt;JG_skrót,&lt;/P&gt;&lt;P&gt;Data_zwolnienia,&lt;/P&gt;&lt;P&gt;FirstSortedValue(JG_skrót, -Data_zwolnienia) AS Aktualna&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;$(HrIBSQvd)SAP1_*.qvd (qvd)&lt;/P&gt;&lt;P&gt;group by Klucz_Mandant_Nr_osobowy,JG_skrót,Data_zwolnienia;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442165#M432622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T09:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442166#M432623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Too much data (dates in this case) shouldn't be a problem for QlikView &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get NULL values from FirstSortedValue() however, if there are multiple possible company values for the same date, as the aggregation function can only return one value and doesn't know which one to take.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should happen in that case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442166#M432623</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-12T10:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442167#M432624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the problem using 2 applymaps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max_Spolki_max_data:&lt;/P&gt;&lt;P&gt; mapping load&lt;/P&gt;&lt;P&gt;Klucz_Mandant_Nr_osobowy,&lt;/P&gt;&lt;P&gt;date(max(Data_zwolnienia))&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;$(HrIBSQvd)SAP1_*.qvd (qvd)&lt;/P&gt;&lt;P&gt;group by Klucz_Mandant_Nr_osobowy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Max_Spolki_JG_skrót:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Klucz_Mandant_Nr_osobowy,&lt;/P&gt;&lt;P&gt;JG_skrót&lt;/P&gt;&lt;P&gt;from $(HrIBSQvd)SAP1_*.qvd (qvd)&lt;/P&gt;&lt;P&gt;where applymap('Max_Spolki_max_data',Klucz_Mandant_Nr_osobowy,0)=date(Data_zwolnienia);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;So here I am creating where clause and check if the max date is equal date value from first applymap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Best Wishes,&lt;BR /&gt; Jacek Antek&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442167#M432624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T10:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442168#M432625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't you get double results for some of your IDs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just naticed that you didn't use my example in the first test. In your example code you were adding too many GROUP BY fields. You only need one, &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;Klucz_Mandant_Nr_osobowy&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are trying to do in your second example can be done with a single call to FirstSortedValue(). Makes your script much simpler...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442168#M432625</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-12T10:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442169#M432626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was using your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MapID2Company:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MAPPING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Klucz_Mandant_Nr_osobowy AS IndexValue,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;JG_skrót, -&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Data_zwolnienia) AS TranslationValue&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;RESIDENT Facts&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;GROUP BY &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Klucz_Mandant_Nr_osobowy;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And it is no working unfortunately - there is null value for ID_number 600-0000002 and should be Company "JICT". &lt;BR /&gt;You wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;if there are multiple possible company values for the same date&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;unfortunately here I have this issue so FirstSortedValue will not work…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Best wishes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d; background: white;"&gt;Jacek Antek&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442169#M432626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T10:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442170#M432627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;That can be fixed. firstSortedValue() allows for a third parameter that can be used to select from multiple "good" results.&lt;/SPAN&gt; But then we need to know what value is better than the others and why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Edit] The Rank parameter cannot be used for that. It just specifies which result to return.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:00:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442170#M432627</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-12T11:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442171#M432628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it can be a problem here how to differ for example 3 different company names as TEXT ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Wishes,&lt;/P&gt;&lt;P&gt;Jacek Antek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442171#M432628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T11:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442172#M432629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this mean that you are ok with any arbitrary selection of the linked company?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442172#M432629</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-12T11:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442173#M432630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have checked this and my row source table looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik2.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/179393_qlik2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to take only last row from this table with max date. &lt;/P&gt;&lt;P&gt;We should not have more than 1 company for each date in my model. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that FirstSortedValue should work here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Wishes,&lt;/P&gt;&lt;P&gt;Jacek &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442173#M432630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T11:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap with Max</title>
      <link>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442174#M432631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are no nulls in &lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Data_zwolnienia &lt;/SPAN&gt;you can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;_temp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Klucz_Mandant_Nr_osobowy,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;AutoNumber(RowNo(), &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: courier new,courier; font-weight: inherit;"&gt;Klucz_Mandant_Nr_osobowy) AS Sort_ID,&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;JG_skrót,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;Data_zwolnienia&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;RESIDENT Facts&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;ORDER BY &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Klucz_Mandant_Nr_osobowy, &lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Data_zwolnienia &lt;/SPAN&gt;DESC;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MapID2Company:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;MAPPING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Klucz_Mandant_Nr_osobowy AS IndexValue,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;JG_skrót&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;AS TranslationValue&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;RESIDENT &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;_temp&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier; font-weight: inherit;"&gt;WHERE &lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Sort_ID = 1;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE _temp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; color: #3d3d3d;"&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 11:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ApplyMap-with-Max/m-p/1442174#M432631</guid>
      <dc:creator>daveamz</dc:creator>
      <dc:date>2017-10-12T11:45:58Z</dc:date>
    </item>
  </channel>
</rss>

