<?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: Max Function with leading 0 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448659#M798941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can get the max with this script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Materials:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Material,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(Material, Index(Material, '-', -1) -1) as MatStart,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text(SubField(Material, '-', -1))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as MatEnd,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Text(SubField(Material, '-', -1)))&amp;nbsp;&amp;nbsp;&amp;nbsp; as LenMatEnd &lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Material&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0009&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0008&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0007&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0003&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0002&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0001&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-03&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-01&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-05&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Left Join (Materials)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MatStart,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MaxString(MatEnd) as MaxMatEnd&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Resident Materials&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;group by MatStart;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186308_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2017 20:10:47 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2017-12-08T20:10:47Z</dc:date>
    <item>
      <title>Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448651#M798927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&amp;nbsp; How can I get the max number andt keep the leading 0&amp;nbsp; based on last suffix... I tried using formula below but doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;max&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Material&lt;/SPAN&gt;, '-',-1),&lt;SPAN style="color: #0000ff;"&gt;Repeat&lt;/SPAN&gt;('0',&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Material&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;, '-',-1)))))&amp;nbsp; or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt; num&lt;SPAN style="font-size: 12pt;"&gt;(max(&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Material&lt;/SPAN&gt;, '-',-1),&lt;SPAN style="color: #0000ff;"&gt;Repeat&lt;/SPAN&gt;('0',&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Material&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;, '-',-1)))))&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186172_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448651#M798927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448652#M798928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Output ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 01:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448652#M798928</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-08T01:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448653#M798929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is duplicate thread, Don't like !! And please provide excel which you have. So then we can work for you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 01:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448653#M798929</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-08T01:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448654#M798930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&amp;nbsp; Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. see attached.&amp;nbsp; Actually my objective is to create new material that has new Mfg Part Number using autonumber .&amp;nbsp;&amp;nbsp;&amp;nbsp; I actually have 2 options :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option 1 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Use&amp;nbsp; autonumber&amp;nbsp; to start after from the max suffix,,,,, pls. see 18 char count&amp;nbsp; tab in the attached.&amp;nbsp; The problem is if the material doesn't exist (Row 10 and 11) , I need to create&amp;nbsp; a new material with number format '0000' suffix.&amp;nbsp; However,&amp;nbsp;&amp;nbsp; New Material field is limited to only 18 char.&amp;nbsp; If there is a way to auto reduce the leading 0 if the item I exceeds to 18 char ( New Material after reduce to 18 char)...., this would be better&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 234px;"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 2 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I was having difficulties in option 1, I tried to break down into a few fields..&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; First determine the max suffix&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Counter - create a counter for unique materials (excluding last number suffix)&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; New suffix Max suffix + counter -&amp;nbsp;&amp;nbsp; this will be the autonumber&lt;/P&gt;&lt;P&gt;4. concat the subfield(OldMaterial,'-',-1)&amp;amp;new suffix - this will be my new material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have explained well.&amp;nbsp; Sorry , But I'm not really a techie person and still consider myself as novice.&amp;nbsp; I would really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 02:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448654#M798930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T02:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448655#M798931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that is the same?? &lt;A href="https://community.qlik.com/message/1396368"&gt;Re: Autonumber Based on Suffix&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 02:24:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448655#M798931</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-08T02:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448656#M798934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;Max(0+Material)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 14:54:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448656#M798934</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2017-12-08T14:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448657#M798936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" data-avatarid="-1" data-userid="99166" data-username="cacosta35" href="https://community.qlik.com/people/cacosta35" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #3778c7;"&gt;Caroline Acosta&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;maybe you can refrence this solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Script:&lt;/P&gt;&lt;P&gt;MData:&lt;/P&gt;&lt;P&gt;LOAD Material, &lt;/P&gt;&lt;P&gt;mid(Material,1,FindOneOf(Material, '-',SubStringCount(Material,'-'))-1) as Lead_Key,&lt;/P&gt;&lt;P&gt;TEXT('' &amp;amp; mid(Material,FindOneOf(Material, '-',SubStringCount(Material,'-'))+1)) as Num_Key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Max (Desired output)]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[.\count.xls]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Max$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot Exp&lt;/P&gt;&lt;P&gt;=MaxString(total &amp;lt;Lead_Key&amp;gt; Num_Key)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Ans_284419.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186268_Ans_284419.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 16:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448657#M798936</guid>
      <dc:creator>cweiping</dc:creator>
      <dc:date>2017-12-08T16:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448658#M798939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&amp;nbsp; Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I just broke down my discussion into 2 parts (max and autonumber).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 18:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448658#M798939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T18:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448659#M798941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can get the max with this script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Materials:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Material,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(Material, Index(Material, '-', -1) -1) as MatStart,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text(SubField(Material, '-', -1))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as MatEnd,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Len(Text(SubField(Material, '-', -1)))&amp;nbsp;&amp;nbsp;&amp;nbsp; as LenMatEnd &lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Material&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0009&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0008&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0007&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0003&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0002&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A1-10847-15-SM-0001&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-03&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-01&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-3848-16-VC-05&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B1-1010365-16-MC-4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Left Join (Materials)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MatStart,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MaxString(MatEnd) as MaxMatEnd&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Resident Materials&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;group by MatStart;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186308_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 20:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448659#M798941</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2017-12-08T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448660#M798943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&amp;nbsp; Weiping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you but is there any way to put the max in the script? ...coz I still need this in my other calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 21:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448660#M798943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T21:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448661#M798946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you !&amp;nbsp; Massimo....it's exactly what I wanted...&amp;nbsp; Thank you once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 23:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448661#M798946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T23:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448662#M798947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have got answer then please close the other thread.&lt;A href="https://community.qlik.com/thread/284422"&gt;Adding text numbers with Leading 0&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 23:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448662#M798947</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2017-12-08T23:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function with leading 0</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448663#M798948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Caroline,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you want max numbers after converting the material numbers to 18 digit. If so, the below solution converts material number to 18 digit and then shows max number from those material part numbers. Have a good weekend!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #3366ff; text-decoration: underline;"&gt;Script:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Material,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Replace(Material,Subfield(Material,'-',-1),'') &amp;amp; Mid(Subfield(Material,'-',-1),If(Len(Material)-17 &amp;gt; 0,Len(Material)-17,1)) as [New Material 18 char],&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;//18 digit conversion&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left(Material,Len(Material)-Len(Subfield(Material,'-',-1))) as [Material (Without Part)],&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;//Materials without part number&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Text(Mid(Subfield(Material,'-',-1),If(Len(Material)-17 &amp;gt; 0,Len(Material)-17,1))) as PartNo&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;// Partno in text format&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is [Max$]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MaxLoad:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load Distinct [Material (Without Part)],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Maxstring(PartNo) as MaxSuffix,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;//Max part number in text format&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count([Material (Without Part)]) as Counter&amp;nbsp; &lt;SPAN style="color: #339966;"&gt;&amp;nbsp; // Count of material without part numbers&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Data Group By [Material (Without Part)];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;&lt;SPAN style="color: #3366ff; text-decoration: underline;"&gt;Result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;&lt;SPAN style="color: #3366ff; text-decoration: underline;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186337_Capture.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Dec 2017 11:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Function-with-leading-0/m-p/1448663#M798948</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2017-12-09T11:03:50Z</dc:date>
    </item>
  </channel>
</rss>

