<?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 Sorting in Charts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319462#M580864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay now its working perfectly....i have changed a bit in the exp like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([LOC CODE] ='CLD', 1,(If( [LOC CODE] ='CTC', 2,(If( [LOC CODE] ='ODD', 3,(If( [LOC CODE] ='SDC', 4,(If( [LOC CODE] ='Plant',5,(If( [LOC CODE] ='Other',6)))))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sridhar i confused a bit with your answer but it is working from you way also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think above exp is the easy to use for sorting what do you say guys.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guys thanx for all your replies and suggestions.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Dec 2011 11:58:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-23T11:58:15Z</dc:date>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319451#M580853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application&amp;nbsp; all the charts for sorting am using&amp;nbsp; the below approach, where I have to sort values of a chart in following order &lt;/P&gt;&lt;P&gt;‘Others’ should be in the last always. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="123.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9826_123.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done here is I have assigned each and every column with a rank no and in sorting properties used conditional sorting for “only(rank)”.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOC CODE, RANK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLD, 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTC, 2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODD, 3&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDC, 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plant, 5&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Other, 6&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this is causing more inline tables getting created inTable Viewer.&amp;nbsp;&amp;nbsp; whether this is correct way to perform this sorting or is there any other better way. Sorting is to be implemented in almost every chart in my application,So please help me this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 10:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319451#M580853</guid>
      <dc:creator />
      <dc:date>2011-12-22T10:02:02Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319452#M580854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi ,&lt;/P&gt;&lt;P&gt;You can use sorting by expression and use if([LOC CODE]='CLD',1,If(........)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;VIjay &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 10:07:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319452#M580854</guid>
      <dc:creator>vijay_iitkgp</dc:creator>
      <dc:date>2011-12-22T10:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319453#M580855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Hi,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;One more option would be loading this inlinen table as mapping table and use Apply Map() function &amp;amp; Dual function to sort your chart. So that you`ll not see many inline tables in table viewer.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Check the attached application.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hope this helps you.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-Sridhar&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 10:56:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319453#M580855</guid>
      <dc:creator>sridhar240784</dc:creator>
      <dc:date>2011-12-22T10:56:45Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319454#M580856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;if(pick(match([LOC CODE] ,'&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;CLD', '&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;CTC', '&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;ODD' ,'&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;SDC', '&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;Plant','&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;Other'),'1','2','3','4','5','6')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12px; background-color: #eef4f9; font-family: 'Courier New';"&gt;thanks &amp;amp;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12px; background-color: #eef4f9; font-family: 'Courier New';"&gt;rohit&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px; background-color: #eef4f9;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 10:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319454#M580856</guid>
      <dc:creator>rohit214</dc:creator>
      <dc:date>2011-12-22T10:58:51Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319455#M580857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using =only(RANK) try using RANK in Expression section and select Ascending or descending.&amp;nbsp; I usually do like this.&amp;nbsp; It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 12:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319455#M580857</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-22T12:36:25Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319456#M580858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for you replies guys......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Jagan: here the problem is i want to avoid inline tables &lt;/P&gt;&lt;P&gt;@Rohit: Your expression is giving error this exp am directly using in sort expression&lt;/P&gt;&lt;P&gt;@Srdiahr: From your option any way inline tables getting created in table viewer.&lt;/P&gt;&lt;P&gt;@Vijay: i have tried you expresssion its also giving error could yyou please give me full exp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319456#M580858</guid>
      <dc:creator />
      <dc:date>2011-12-22T13:10:01Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319457#M580859</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;Try putting the Inline table in the last tab.&amp;nbsp; I also faced the same and moved the inline code to end of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319457#M580859</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2011-12-22T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319458#M580860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;In sort expression you can write&lt;/P&gt;&lt;P&gt;If( LOC CODE ='CLD', 1,&lt;/P&gt;&lt;P&gt;If( LOC CODE ='CTC, 2,&lt;/P&gt;&lt;P&gt;If( LOC CODE ='ODD, 3,&lt;/P&gt;&lt;P&gt;If( LOC CODE ='SDC, 4,&lt;/P&gt;&lt;P&gt; If( LOC CODE ='Plant,5,&lt;/P&gt;&lt;P&gt; If( LOC CODE ='Other,6))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And sort it in ascending order.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;VIjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319458#M580860</guid>
      <dc:creator>vijay_iitkgp</dc:creator>
      <dc:date>2011-12-22T13:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319459#M580861</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;If you use a Mapping load, table will not be shown in table viewer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the explaination copied from QV Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The &lt;SPAN style="font-weight: bold;"&gt;mapping&lt;/SPAN&gt; prefix to a &lt;A&gt;&lt;SPAN style="font-weight: bold;"&gt;Load&lt;/SPAN&gt;&lt;/A&gt; or &lt;A&gt;&lt;SPAN style="font-weight: bold;"&gt;Select&lt;/SPAN&gt;&lt;/A&gt; statement is used for mapping a certain field value or expression to the values in the first column of the mapping table. A mapping table consists of two columns, the fist containing comparison values and the second containing the desired mapping values. Mapping tables will be stored temporarily in the memory and dropped automatically, after script execution."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319459#M580861</guid>
      <dc:creator>sridhar240784</dc:creator>
      <dc:date>2011-12-22T13:32:26Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319460#M580862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Jagan: if we move inline code to last tab any way tables are getting created am i right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ Vijay: still showing error in expression look into the below screen shot &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Sridhar: I have tried you approach its working correctly and this is ok for limited records but if we have 100-1000 records in that case how to do????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sort.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9834_sort.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;If am wrong please correct me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:13:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319460#M580862</guid>
      <dc:creator />
      <dc:date>2011-12-22T14:13:29Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319461#M580863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Oops...!! I`m not sure, whether i understood your problem correctly or not. you are comfortable to write pages and pages of if condition when you have 100 to 1000 code but not comfortable to create a inline table &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Do have any rules to create a sort order? if so.. share us the rules for sorting order, will try to create the dynamic solution.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hope i`m clear.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-Sridhar&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 14:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319461#M580863</guid>
      <dc:creator>sridhar240784</dc:creator>
      <dc:date>2011-12-22T14:32:40Z</dc:date>
    </item>
    <item>
      <title>Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319462#M580864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay now its working perfectly....i have changed a bit in the exp like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([LOC CODE] ='CLD', 1,(If( [LOC CODE] ='CTC', 2,(If( [LOC CODE] ='ODD', 3,(If( [LOC CODE] ='SDC', 4,(If( [LOC CODE] ='Plant',5,(If( [LOC CODE] ='Other',6)))))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sridhar i confused a bit with your answer but it is working from you way also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think above exp is the easy to use for sorting what do you say guys.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guys thanx for all your replies and suggestions.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 11:58:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319462#M580864</guid>
      <dc:creator />
      <dc:date>2011-12-23T11:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting in Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319463#M580865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do the inline load at the top of the script, leave the RANK field out of it, and then drop the table at the end of the script.&amp;nbsp; Then you can sort by original load sequence.&amp;nbsp; I do that all the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Location Sort Order]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOC CODE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CLD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CTC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ODD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Plant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Other&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// rest of your script here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE [Location Sort Order];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to reload to change the sort order, which might be a drawback, but it's then easy to use that same sort order everywhere.&amp;nbsp; If you really want a chart expression for some reason, the match() function returns the sequence number of the first match, so this should work as the sort expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;match([LOC CODE],'CLD','CTC','ODD','SDC','Plant','Other')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 21:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-in-Charts/m-p/319463#M580865</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-27T21:54:46Z</dc:date>
    </item>
  </channel>
</rss>

