<?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 Problem with sort order in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387304#M144586</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'm trying to sort a table where regardless of the total, when Category is 'Other' then it should be at bottom of the table. The other values should be sorted by total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort-&amp;gt; Sum(Units):&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort-&amp;gt; Sum(Units)*if(Category='Other',-1,1) :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;-200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. Now, the problem is that is some cases the total values are negative which put Other at the top (-200*-1=200) and not bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;-200&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;-100&lt;/TD&gt;&lt;TD align="right"&gt;-100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;-300&lt;/TD&gt;&lt;TD align="right"&gt;-300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;"&gt;-400&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;"&gt;-400&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be a possible sort expression that suits both scenarios?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 May 2013 14:00:10 GMT</pubDate>
    <dc:creator>tduarte</dc:creator>
    <dc:date>2013-05-20T14:00:10Z</dc:date>
    <item>
      <title>Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387304#M144586</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'm trying to sort a table where regardless of the total, when Category is 'Other' then it should be at bottom of the table. The other values should be sorted by total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort-&amp;gt; Sum(Units):&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort-&amp;gt; Sum(Units)*if(Category='Other',-1,1) :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;TD align="right"&gt;-200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far so good. Now, the problem is that is some cases the total values are negative which put Other at the top (-200*-1=200) and not bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="91"&gt;Category&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Units&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;" width="76"&gt;Sort&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Other&lt;/TD&gt;&lt;TD align="right"&gt;-200&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Desktops&lt;/TD&gt;&lt;TD align="right"&gt;-100&lt;/TD&gt;&lt;TD align="right"&gt;-100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Tablets&lt;/TD&gt;&lt;TD align="right"&gt;-300&lt;/TD&gt;&lt;TD align="right"&gt;-300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Notebooks&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;"&gt;-400&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right;"&gt;-400&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be a possible sort expression that suits both scenarios?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:00:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387304#M144586</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-20T14:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387305#M144587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe use a static sort number for 'Others':&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Category = 'Other', -99999999, Sum(Units) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:20:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387305#M144587</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-20T14:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387306#M144588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum(Units)*if(Category='Other',-1*sign(Sum(Units)),1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387306#M144588</guid>
      <dc:creator />
      <dc:date>2013-05-20T14:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387307#M144589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try using the DUAL keyword in your load to assign both a string and a numeric value to your Category.&amp;nbsp; Then you can set the sort order of Category to the Numeric Value.&amp;nbsp; I hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387307#M144589</guid>
      <dc:creator>mphekin12</dc:creator>
      <dc:date>2013-05-20T14:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387308#M144590</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;it depends on the cardinality of your data. This algorithm could work is fabs(sum(Units)) &amp;gt;=1: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Units) * if (Category='Other', (1 / Sum(Units))* -1, 1)&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;&lt;/P&gt;&lt;P&gt;Sacho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:41:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387308#M144590</guid>
      <dc:creator />
      <dc:date>2013-05-20T14:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387309#M144591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Oscar Pizarro wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Units)*if(Category='Other',-1*sign(Sum(Units)),1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks but it doesn't work for the all negative situation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 15:29:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387309#M144591</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-20T15:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387310#M144592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;swuehl wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe use a static sort number for 'Others':&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Category = 'Other', -99999999, Sum(Units) )&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks swehl.&lt;/P&gt;&lt;P&gt;It does the job and it's optimised.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 15:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387310#M144592</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-20T15:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387311#M144593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;mphekin12 wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try using the DUAL keyword in your load to assign both a string and a numeric value to your Category.&amp;nbsp; Then you can set the sort order of Category to the Numeric Value.&amp;nbsp; I hope this helps!&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not sure if it would aplicable on my case because the values of Category are not static and will change during reloads. &lt;/P&gt;&lt;P&gt;Am I correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 15:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387311#M144593</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-20T15:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387312#M144594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt;"&gt;You are correct if your Categories are not static. What about if you used a sort flag like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style=": ; color: #333333; font-size: 8pt; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; ,&amp;amp;quot: ;"&gt;(&lt;/SPAN&gt;&lt;SPAN style=": ; color: maroon; font-size: 8pt; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; ,&amp;amp;quot: ;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style=": ; color: #333333; font-size: 8pt; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; ,&amp;amp;quot: ;"&gt;='Other', -1, 0) &lt;/SPAN&gt;&lt;SPAN style=": ; color: blue; font-size: 8pt; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; Arial&amp;amp;quot: ; ,&amp;amp;quot: ;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #333333; font-family: &amp;amp;quot;Arial&amp;amp;quot;,&amp;amp;quot;sans-serif&amp;amp;quot;; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SortLastFlag &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;You can then use this field as a hidden dimension in your table/chart and use this as your primary sort dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 15:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387312#M144594</guid>
      <dc:creator>mphekin12</dc:creator>
      <dc:date>2013-05-20T15:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387313#M144595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This what I had before posting this discussion:&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 10pt; font-family: Arial;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: maroon;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial;"&gt;='Other', -1, 1) &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;&lt;SPAN style="font-size: 8pt; color: #333333;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;SortCategory;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort order expression:&lt;/P&gt;&lt;P&gt;Sum(Units)*SortCategory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But like I explained, there's the issue with the negative totals.&lt;/P&gt;&lt;P&gt;All I want is whenever the value 'Other' is found, it must be last in sort order regardless of its total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 16:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387313#M144595</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-20T16:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387314#M144596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please take a look at the sample I have attached.&amp;nbsp; I am not using the flag in the calculation at all.&amp;nbsp; I'm only using it as a dimension for sorting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 17:28:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387314#M144596</guid>
      <dc:creator>mphekin12</dc:creator>
      <dc:date>2013-05-20T17:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sort order</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387315#M144597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks mphekin12,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works but not applicable in my situation because my object is pivot table, meaning I cannot hide the dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 08:27:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-sort-order/m-p/387315#M144597</guid>
      <dc:creator>tduarte</dc:creator>
      <dc:date>2013-05-21T08:27:45Z</dc:date>
    </item>
  </channel>
</rss>

