<?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: Multilevel sort on bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069516#M921991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the straight table you have is correctly sorted into the desired order but how do you translate that same order onto the bar graph?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2016 07:01:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-04T07:01:18Z</dc:date>
    <item>
      <title>Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069508#M921983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may look like a simple task but I can't seem to do it properly. Most of the materials I've found so far here are on custom sorts, but nothing on multilevel sort. Essentially, I want my bar chart to sort first by Country (Descending A&amp;gt;Z) then by Value (Descending).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample table below and I have attached the qvw file with the bar chart.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="174" style="border: 1px solid #000000; width: 175px; height: 159px;" width="173"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Location&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;USA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Canada&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;CC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;USA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DD&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Canada&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;EE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;USA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;FF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Canada&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping for any advice. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069508#M921983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069509#M921984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069509#M921984</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-05-04T06:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069510#M921985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chanty, in your file, the bars are sorted by Country but they are not sorted by Value as a secondary sort. The final look of the graph would have the bars in this order:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FF&lt;/STRONG&gt; (Canada-1000) - &lt;STRONG&gt;BB&lt;/STRONG&gt; (Canada-500) - &lt;STRONG&gt;DD&lt;/STRONG&gt; (Canada-400) - &lt;STRONG&gt;EE&lt;/STRONG&gt; (USA-300) - &lt;STRONG&gt;CC&lt;/STRONG&gt; (USA-250) - &lt;STRONG&gt;AA&lt;/STRONG&gt; (USA-150)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069510#M921985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T06:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069511#M921986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First create the Sort Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort:&lt;/P&gt;&lt;P&gt;LOAD distinct Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Autonumber(Country) as SortCountry&lt;/P&gt;&lt;P&gt;Resident YourTable&lt;/P&gt;&lt;P&gt;Order by Country desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now go to chart Properties-Sort Tab-&amp;gt; Check expression -&amp;gt; Descending put below condition&lt;/P&gt;&lt;P&gt;=SortCountry &amp;amp; YourExpression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069511#M921986</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-04T06:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069512#M921987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Chart Properties -&amp;gt; Sort Tab&lt;/P&gt;&lt;P&gt;- Make sure the Sort list is right (1st Country, 2nd Value)&lt;/P&gt;&lt;P&gt;- Sort Country A-Z&lt;/P&gt;&lt;P&gt;- Sort Value Numeric Descending&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123487_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069512#M921987</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-05-04T06:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069513#M921988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Try sort expression as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=Sum(Value)&amp;amp;Ord(Location)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123462_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Attached the updated file.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069513#M921988</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-04T06:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069514#M921989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe this ! !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069514#M921989</guid>
      <dc:creator>florentina_doga</dc:creator>
      <dc:date>2016-05-04T06:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069515#M921990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This actually achieved the desired sort order by chance. But it is not working well. For one thing, the expression does not consider the Country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should sort by Country first&lt;/P&gt;&lt;P&gt;THEN&lt;/P&gt;&lt;P&gt;sort by Sum(Value)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 06:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069515#M921990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T06:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069516#M921991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the straight table you have is correctly sorted into the desired order but how do you translate that same order onto the bar graph?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 07:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069516#M921991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T07:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069517#M921992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried and yes this looks good! Quick question, is there an alternative way of achieving this from within the bar chart only and without having to use the Load Script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 07:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069517#M921992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T07:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069518#M921993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 07:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069518#M921993</guid>
      <dc:creator>florentina_doga</dc:creator>
      <dc:date>2016-05-04T07:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069519#M921994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good approach and considered this earlier. I failed to mention that I can't change the look and feel of the chart. X-axis should always just be the Location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 07:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069519#M921994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T07:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069520#M921995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this for the sorting expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ord(Country) * 10000 - Sum(Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giving higher weight to Country by multiplying it by 10000 and then subtracting Sum(Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number to be multiplied with will depend on the max value of Sum(Value). You would want the 10,000 in my example to be bigger than the max value of Sum(Value). In our case the max was 1000 so I randomly picked 10000. But if in your actual scenario the max(value) is 600000000, I would multiply by 10&lt;SPAN style="font-size: 13.3333px;"&gt;00000000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="123503" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123503_Capture.PNG" style="height: 211px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess a better image with slight modification of data&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/123502_Capture.PNG" style="height: 173px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069520#M921995</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T08:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069521#M921996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try the way suggested by others as alternative. But doing so in script will keep the things well structured rather than going for complex expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069521#M921996</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-04T08:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069522#M921997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;according to the sort tab we can sort is possible &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 08:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069522#M921997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T08:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multilevel sort on bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069523#M921998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 29px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Yes. I didn't notice it properly. You can use Sunny's solution. But you no need to enter the multiplied value manually. Instead you can use below expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 29px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 29px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Ord(Country) * Max(Total Aggr(Sum(Value),Location)) - Sum(Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multilevel-sort-on-bar-chart/m-p/1069523#M921998</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-04T16:09:25Z</dc:date>
    </item>
  </channel>
</rss>

