<?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: Sort custom dimension with multiple criteria in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-custom-dimension-with-multiple-criteria/m-p/864576#M302554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered my own question over here: &lt;A href="https://community.qlik.com/thread/172490"&gt;Custom dimension &amp;amp;amp; custom sort&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 13:14:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-23T13:14:13Z</dc:date>
    <item>
      <title>Sort custom dimension with multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-custom-dimension-with-multiple-criteria/m-p/864575#M302553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Community, I would love your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a complicated chart requirement. This is for a Mekko chart, but the problem applies to other types as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I have to show the top 5 in dimension 'Company' by sum(Amounts), regardless of selection, along with everything else lumped into 'Others'. However, I cannot just use Dimension Limits, because...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, if the user makes a selection, the selection(s) from Company must be added to that top 5. Furthermore, the selections must be sorted to the bottom, while the top 5 must remain sorted by sum(Amounts). 'Others' must remain at the top as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I am using a custom dimension: &lt;/P&gt;&lt;P&gt;=aggr(if(SubStringCount(Concat(Distinct GetFieldSelections(Company)), Company)&amp;gt;0,Company,&lt;/P&gt;&lt;P&gt;IF(RANK(SUM(Amounts)) &amp;lt;=5, Only({1}Company),'Others')),Company)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is letting me break out my selections from 'Others', however, I cannot figure out the sort expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do I keep Others on top, my selections at the bottom, and top 5 in the middle sorted by Amounts?&lt;/STRONG&gt; I have attached a data and chart sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, if you selected companies E and F, I would want the order in the table and chart to be:&lt;/P&gt;&lt;P&gt;Others, A, J, H, I, C, E, F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 00:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-custom-dimension-with-multiple-criteria/m-p/864575#M302553</guid>
      <dc:creator />
      <dc:date>2015-07-14T00:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sort custom dimension with multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-custom-dimension-with-multiple-criteria/m-p/864576#M302554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered my own question over here: &lt;A href="https://community.qlik.com/thread/172490"&gt;Custom dimension &amp;amp;amp; custom sort&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 13:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-custom-dimension-with-multiple-criteria/m-p/864576#M302554</guid>
      <dc:creator />
      <dc:date>2015-07-23T13:14:13Z</dc:date>
    </item>
  </channel>
</rss>

