<?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: Order of text values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991896#M337929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the below expression in a list box:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98236_Capture.PNG" style="height: 236px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;And then, sort it as text in an ascending order:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/98240_Capture1.PNG" style="height: 301px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Sep 2015 22:38:49 GMT</pubDate>
    <dc:creator>sinanozdemir</dc:creator>
    <dc:date>2015-09-07T22:38:49Z</dc:date>
    <item>
      <title>Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991895#M337928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with ordering the values of a field in a list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a products table I have a group field (gp), a code field (code), a description field (desc) and a field named &lt;EM&gt;"IDProduct"&lt;/EM&gt; which result from concatenate the other three:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;gp&amp;amp;' | '&amp;amp;code&amp;amp;' | '&amp;amp;desc as IDProduct&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the list box I select &lt;EM&gt;"Order by text"&lt;/EM&gt; and the result is this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="list_box.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98234_list_box.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;But the correct order should be like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="excel.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/98235_excel.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Could anyone help me solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 21:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991895#M337928</guid>
      <dc:creator />
      <dc:date>2015-09-07T21:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991896#M337929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the below expression in a list box:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/98236_Capture.PNG" style="height: 236px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;And then, sort it as text in an ascending order:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/98240_Capture1.PNG" style="height: 301px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 22:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991896#M337929</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-07T22:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991897#M337930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, it works.&lt;/P&gt;&lt;P&gt;But I have nearly 250 thousand records in the products table besides other tables in the app. So this solution will slow down the app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 00:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991897#M337930</guid>
      <dc:creator />
      <dc:date>2015-09-09T00:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991898#M337931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Use&lt;/SPAN&gt; &lt;EM style="color: #0000ff; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #008000;"&gt;autonumber&lt;/SPAN&gt;(gp&amp;amp;' | '&amp;amp;code&amp;amp;' | '&amp;amp;desc) &lt;SPAN style="color: #993366;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #ff6600;"&gt;IDProduct.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Later sort the column on number which is very faster. Hope this will help you.&lt;/SPAN&gt;&lt;EM style=": ; color: #ff6600; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #ff6600; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 02:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991898#M337931</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-09T02:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991899#M337932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What QlikView calls Text Order is what is often called "Natural Sort" these days. Look up the term in Wikipedia for a full explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strangely enought the Load Script does "Natural Sort" while the chart engine does an ASCII-sort. That is why Sinan's suggestion works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to force QlikView to do an ASCII-sort in the Load Script - this is a way you can do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="98386" alt="2015-09-09 #1.PNG" class="jive-image image-1" src="/legacyfs/online/98386_2015-09-09 #1.PNG" style="height: 519px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vertical bar that gets inserted between each digit will break the Natural Sort of QlikView so it will do a character by character sort as there will be no more consecutive digits anymore. MapSubstring() function will insert these vertical bars and then doing a RESIDENT load with an ORDER BY on this new temporary field we can get the correct sort order and assign it by using RowNo(). By combining the the product string with the sort order number into a dual field named Product we achieve that QlikView will use the number to denote the sorting order of this field but use the string as the displayed part of the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 15:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991899#M337932</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-09T15:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991900#M337933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="2015-09-09 #2.PNG" class="jive-image image-1" src="/legacyfs/online/98398_2015-09-09 #2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 15:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991900#M337933</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-09T15:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991901#M337934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I'm looking for, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just added the letters of the alphabet to the mapping table since the group ID is alphanumeric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also it works without the &lt;EM&gt;Dual&lt;/EM&gt; function for the &lt;EM&gt;Product&lt;/EM&gt; field, I just set the order by load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 17:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991901#M337934</guid>
      <dc:creator />
      <dc:date>2015-09-10T17:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Order of text values</title>
      <link>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991902#M337935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you should close this thread an mark it as answered &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 19:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-of-text-values/m-p/991902#M337935</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-10T19:57:20Z</dc:date>
    </item>
  </channel>
</rss>

