<?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 Sort with zeroes leading values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915357#M317547</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;i have a table with a field "code" like this:&lt;/P&gt;&lt;P&gt;00A&lt;/P&gt;&lt;P&gt;01A&lt;/P&gt;&lt;P&gt;02A&lt;/P&gt;&lt;P&gt;03A&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i put this field in a table o in a list box and set order by TEXT, i have this result:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;00A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;01A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;02A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;3&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;03A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;that's not correct... value 2 must be after 02A and after 03A.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I already try to add the function TEXT(code) in loading.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Any ideas?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 10:52:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-07T10:52:13Z</dc:date>
    <item>
      <title>Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915357#M317547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;i have a table with a field "code" like this:&lt;/P&gt;&lt;P&gt;00A&lt;/P&gt;&lt;P&gt;01A&lt;/P&gt;&lt;P&gt;02A&lt;/P&gt;&lt;P&gt;03A&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i put this field in a table o in a list box and set order by TEXT, i have this result:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;00A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;01A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;02A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;3&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;03A&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;that's not correct... value 2 must be after 02A and after 03A.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I already try to add the function TEXT(code) in loading.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Any ideas?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 10:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915357#M317547</guid>
      <dc:creator />
      <dc:date>2015-08-07T10:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915358#M317548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what should be the order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:01:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915358#M317548</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-08-07T11:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915359#M317549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first i typed :&lt;/P&gt;&lt;P&gt;00A&lt;/P&gt;&lt;P&gt;01A&lt;/P&gt;&lt;P&gt;02A&lt;/P&gt;&lt;P&gt;03A&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915359#M317549</guid>
      <dc:creator />
      <dc:date>2015-08-07T11:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915360#M317550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if it is regular that only 1 character can occur you may try this in sort Expression ascending:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isnum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;code&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1)), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;code&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;code&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;code&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915360#M317550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-07T11:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915361#M317551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any other check box checked bcz selecting TEXT only option in sort is giving me different result&lt;IMG alt="175717.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95345_175717.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915361#M317551</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-08-07T11:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915362#M317552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;Data2&amp;amp;Data1 as Sort;&lt;/P&gt;&lt;P&gt;LOAD *, if(IsNum(Data),Data) as Data1,if(IsText(Data),Data) as Data2 Inline [&lt;/P&gt;&lt;P&gt;ID,Data&lt;/P&gt;&lt;P&gt;1,00A&lt;/P&gt;&lt;P&gt;4,03A&lt;/P&gt;&lt;P&gt;2,01A&lt;/P&gt;&lt;P&gt;3,02A&lt;/P&gt;&lt;P&gt;5,2&lt;/P&gt;&lt;P&gt;6,3&lt;/P&gt;&lt;P&gt;7,02A&lt;/P&gt;&lt;P&gt;8,03A&lt;/P&gt;&lt;P&gt;9,00A ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Use &lt;STRONG&gt;Sort &lt;/STRONG&gt;in listbox&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915362#M317552</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-08-07T11:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915363#M317553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the sort order is important then first load the values in the order you want them. Then you can use Load Order as sort option in the listbox object for that field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 11:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915363#M317553</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-07T11:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915364#M317554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enable sort by expression, and use this expression:&lt;/P&gt;&lt;P&gt;=Right('000' &amp;amp; code, 3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This should not be necessary, but it will work, and will not require you to know all the values before hand, like many of the solutions above)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 12:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915364#M317554</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-07T12:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915365#M317555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;A href="https://community.qlik.com/qlik-users/13229"&gt;jontydkpi&lt;/A&gt; I think it will not work when order of the data is not fixed like the data which I have loaded in my post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 12:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915365#M317555</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-08-07T12:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915366#M317556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do they all have a suffix A? Could you post your data please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 13:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915366#M317556</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-07T13:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915367#M317557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does sort the data the way the OP requested, and it does not require you to know all the codes (and manually sort them) beforehand. It does assume that nothing is longer than 3 characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 13:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915367#M317557</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-07T13:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915368#M317558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for reply,&lt;/P&gt;&lt;P&gt;but data are not so simple, i wrote only an example. The field lenght can be more than 3 chars and can contains numbers and letters (and more than one "0" in the left).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I resolve in this way: in the table and in the field box i use then expression "=text(code)" instead of "code".&lt;/P&gt;&lt;P&gt;Then sorting by TEXT and it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:40:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915368#M317558</guid>
      <dc:creator />
      <dc:date>2015-08-07T14:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915369#M317559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrea,&lt;/P&gt;&lt;P&gt;in Tab Sort -&amp;gt; Expression&lt;/P&gt;&lt;P&gt;Rank(Field)&amp;nbsp;&amp;nbsp;&amp;nbsp; desc&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95370_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:01:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915369#M317559</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2015-08-07T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with zeroes leading values</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915370#M317560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrea,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just loaded the data like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; Sort:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; Data&lt;BR /&gt; 00A&lt;BR /&gt; 01A&lt;BR /&gt; 02A&lt;BR /&gt; 03A&lt;BR /&gt; 2&lt;BR /&gt; 3&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Added to a list box with the default sort and it's appears to be as you wish&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/95376_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Confused!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-zeroes-leading-values/m-p/915370#M317560</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-08-07T15:12:56Z</dc:date>
    </item>
  </channel>
</rss>

