<?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: MaxString / MinString question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MaxString-MinString-question/m-p/1885236#M1217034</link>
    <description>&lt;P&gt;According to the doc, MaxString returns the last value in sort order.&amp;nbsp; Blank will sort after numbers, so I think you can swap in a null for blanks to get what you want.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;MaxString&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;if&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;len&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;Trim&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;B&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)) = 0, &lt;/SPAN&gt;null&lt;SPAN class="s1"&gt;(), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;B&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)) &lt;/SPAN&gt;as &lt;SPAN class="s2"&gt;B&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 18:35:01 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2022-01-25T18:35:01Z</dc:date>
    <item>
      <title>MaxString / MinString question</title>
      <link>https://community.qlik.com/t5/QlikView/MaxString-MinString-question/m-p/1884939#M1217021</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I ued the MaxString function to group duplicates. ( same id of person but for one text field, one has blank value and the other one no so I want to take the not empty value )&lt;/P&gt;
&lt;P&gt;And so I checked the use of this function, it uses the ANSI character and i suppose it does the sum of the AINSI value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if we have an field with empty values and an ' OK ' value it will take the OK one ( cause sum of ANSI value is superior ) &lt;/P&gt;
&lt;P&gt;But i have a problem when there is a date when i make some tests. for example&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="flo2_0-1643107003046.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70891iF71914D69BB59ED5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="flo2_0-1643107003046.png" alt="flo2_0-1643107003046.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have these values, so 4 empty lines and one which has one date, if I use group by and for the second column I use MaxString, according to me it should return the date, but it doesn't, it returns a blank value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="flo2_1-1643107120058.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70892i359842BEF7599249/image-size/medium?v=v2&amp;amp;px=400" role="button" title="flo2_1-1643107120058.png" alt="flo2_1-1643107120058.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;( code is&lt;/P&gt;
&lt;P&gt;table1:&lt;BR /&gt;LOAD A, &lt;BR /&gt;B&lt;BR /&gt;FROM&lt;BR /&gt;[testMaxString.xlsx]&lt;BR /&gt;(ooxml, no labels);&lt;/P&gt;
&lt;P&gt;table2:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;load&lt;BR /&gt;A, &lt;BR /&gt;MaxString(B) as B&lt;BR /&gt;resident table1&lt;BR /&gt;group by A;&lt;BR /&gt;drop table table1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So i have understood that i sould use the Max Function for numeric values, but still, why MaxString doesn't return the date, the sum of ansi character are superior to blank values no ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 10:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MaxString-MinString-question/m-p/1884939#M1217021</guid>
      <dc:creator>flo2</dc:creator>
      <dc:date>2022-01-25T10:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: MaxString / MinString question</title>
      <link>https://community.qlik.com/t5/QlikView/MaxString-MinString-question/m-p/1885236#M1217034</link>
      <description>&lt;P&gt;According to the doc, MaxString returns the last value in sort order.&amp;nbsp; Blank will sort after numbers, so I think you can swap in a null for blanks to get what you want.&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;MaxString&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;if&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;len&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;Trim&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;B&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)) = 0, &lt;/SPAN&gt;null&lt;SPAN class="s1"&gt;(), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;B&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)) &lt;/SPAN&gt;as &lt;SPAN class="s2"&gt;B&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 18:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MaxString-MinString-question/m-p/1885236#M1217034</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-01-25T18:35:01Z</dc:date>
    </item>
  </channel>
</rss>

