<?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: dynamic sort order for expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031376#M348202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have a number generated in the script itself to sort it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Apr 2016 06:19:56 GMT</pubDate>
    <dc:creator>sujeetsingh</dc:creator>
    <dc:date>2016-04-14T06:19:56Z</dc:date>
    <item>
      <title>dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031371#M348197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have various measurements with a flag "high is good" and country as a dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When presenting them in a bar chart, I want them to sort from "bad to good", meaning the worst are left and the better ones are to the right and potentially I have to scoll to see them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned before, with the flag "high is good" altering, some need to be sorted ascending and some descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make this depending on the flag?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was well explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep Qliking&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 05:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031371#M348197</guid>
      <dc:creator>michael_klix</dc:creator>
      <dc:date>2016-04-14T05:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031372#M348198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in sort tab...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression: &lt;/P&gt;&lt;P&gt;=Match(FieldName,' A','b','c')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lik so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u wan load order&amp;nbsp; ascending or desc&amp;nbsp; chk that&lt;IMG alt="exp.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/121618_exp.PNG" style="height: 379px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 05:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031372#M348198</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-04-14T05:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031373#M348199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to Bar chart properties-&amp;gt; Sort Tab-&amp;gt; Sort it by expression ascending or descending&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or sort it by Y-Value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 05:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031373#M348199</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-04-14T05:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031374#M348200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this great blog: &lt;A href="https://community.qlik.com/docs/DOC-7220"&gt;Perfectly Sorting Pivot Table (by A-Z. y-Value set for each dim-level)&lt;/A&gt; by &lt;A href="https://community.qlik.com/qlik-users/20543"&gt;cschwarz&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 05:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031374#M348200</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-04-14T05:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031375#M348201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use the Match Function, it returns a 1 if a value in the list you specify is found and 0 if the value was not found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;EM&gt;&lt;STRONG&gt;Match(&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;EM&gt;flag, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;high is good&lt;/SPAN&gt;')&lt;/EM&gt; &lt;/STRONG&gt;will return 1 for all the rows that contains '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;high is good' and they will be first if you sort by expression showed in Chanty's post&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 06:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031375#M348201</guid>
      <dc:creator />
      <dc:date>2016-04-14T06:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031376#M348202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have a number generated in the script itself to sort it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 06:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031376#M348202</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2016-04-14T06:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031377#M348203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look into this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-5163"&gt;Sorting in qlikview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 06:27:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031377#M348203</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-04-14T06:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031378#M348204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done such interactive sorting with a sort-expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YourChartExpression - $(vSortDirection)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vSortDirection contained either 0 or a very high value like 10000000000 which will be reverse the sorting. You could set the variable with a inputbox or a button and as alternatively you could also use a field-selection maybe from a small inline table like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SortDirection:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Direction, SortValue&lt;/P&gt;&lt;P&gt;Ascending, 0&lt;/P&gt;&lt;P&gt;Descending, 1000000000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and your sort-expression could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YourChartExpression - SortValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 06:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031378#M348204</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-04-14T06:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031379#M348205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Markus,&lt;/P&gt;&lt;P&gt;just the right hint, but i do it even more simple now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The wayto revert the sorting order is to multiply the expression value with (-1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As my flag "High is good" unfortunately is (0,1), I use the sorting Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= (2*flag_High_Is_Good -1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this is -1 for high is good=0&lt;/P&gt;&lt;P&gt;* MyExpression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works perfectly. Does it make sense this way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone want to add a user interaction capability to change the sorting in a chart, then a button to toggle a variable (-1,1) would be appropriate as well, of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for all contributions.&lt;/P&gt;&lt;P&gt;Keep Qliking&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 11:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031379#M348205</guid>
      <dc:creator>michael_klix</dc:creator>
      <dc:date>2016-04-14T11:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031380#M348206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's a great solution - I like it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 11:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031380#M348206</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-04-14T11:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031381#M348207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chanty&lt;/P&gt;&lt;P&gt;(and all who followed up later on the match option),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the reply(s). However I dont think that match would work as the available Country names (Dimension) are not known to me. In addition to be honest, I did not understand how match could help out here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to open another question, but just to clarify the problem, here a draft table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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;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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &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; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="205"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;" width="77"&gt;&lt;SPAN style="color: #000000;"&gt;high is good&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;country&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;kpi1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;kpi2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;a&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;98&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;b&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;95&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;c&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;93&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;8&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;d&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;92&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="17" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;e&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;90&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px windowtext; border-image: none;"&gt;&lt;SPAN style="color: #000000;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When displaying &lt;SPAN style="text-decoration: underline;"&gt;only one&lt;/SPAN&gt; KPI in a bar chart, I want KPI1 to be sorted ascending and KPI2 to be sorted descending. So always the worst is left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proposed solution is to simply multiply a KPI with (-1) if the "high is good" flag is 0 and use ascending as default sorting order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 11:24:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031381#M348207</guid>
      <dc:creator>michael_klix</dc:creator>
      <dc:date>2016-04-14T11:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic sort order for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031382#M348208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cheers&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; you got the solution &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 11:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dynamic-sort-order-for-expressions/m-p/1031382#M348208</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-04-14T11:26:31Z</dc:date>
    </item>
  </channel>
</rss>

