<?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 chart by two expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804818#M535424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using a compound formula like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Percentaje) * 10000 + sum(Deliveries)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10000 is an arbitrary value larger than the maximum possible value for "Deliveries".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See QVW attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2014 13:12:03 GMT</pubDate>
    <dc:creator>consenit</dc:creator>
    <dc:date>2014-12-10T13:12:03Z</dc:date>
    <item>
      <title>Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804817#M535423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple bar chart with one dimension: Supplier.&lt;/P&gt;&lt;P&gt;And one dimension: Percentage of Good Deliveries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I am sorting by expression: the percentage of good deliveries for the supplier (set analysis). However if a supplier has delivered 1 order, and another supplier has delivered 500; then I want the supplier with 500 to come above the supplier with 1 order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to first sort by percentage of good deliveries, (and if the percentage is the same as another value in the chart e.g. two suppliers are 100%) then sort by count (number of orders)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So: Sort by percentage of good deliveries&lt;/P&gt;&lt;P&gt;If the percentage is the same as another supplier&lt;/P&gt;&lt;P&gt;then sort the matching values by order quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 09:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804817#M535423</guid>
      <dc:creator />
      <dc:date>2014-12-10T09:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804818#M535424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using a compound formula like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Percentaje) * 10000 + sum(Deliveries)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10000 is an arbitrary value larger than the maximum possible value for "Deliveries".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See QVW attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 13:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804818#M535424</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2014-12-10T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804819#M535425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Ernesto, we had considered something like this however when sorting and the count of orders becomes ~&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;10000 then the 30% jumps above the 50% values. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example 'D' should come below 'A' but above 'B'.&lt;/P&gt;&lt;P&gt;As 'D' and 'B' are both 30% but 'D' has more orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Callum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 14:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804819#M535425</guid>
      <dc:creator />
      <dc:date>2014-12-10T14:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804820#M535426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, got it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the function Rank() in the sorting expression, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM(Percentaje)*10000 - Rank(Deliveries)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 15:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804820#M535426</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2014-12-10T15:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804821#M535427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ernesto, that seems to work. &lt;/P&gt;&lt;P&gt;So I changed your sort expression from:&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Percentaje&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;)*10000 - &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;Rank&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;Deliveries&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Update: Have attached working version with Set Analysis also. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Slight bug in that if the percentages are very similar and one vendor has a lot more orders then it will rank higher, not a bad thing but depends on context:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Supplier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Total Orders&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;OTIF %&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;XYZ&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Eg&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 10:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804821#M535427</guid>
      <dc:creator />
      <dc:date>2014-12-11T10:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sort chart by two expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804822#M535428</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 have same requirement but need to consider&amp;nbsp; 4 columns . &lt;/P&gt;&lt;P&gt;if first column value is same then consider second column &lt;/P&gt;&lt;P&gt;if second column also have same value then consider 3rd column&lt;/P&gt;&lt;P&gt;if third column also have same values then consider 4 column. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help on this . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 05:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-chart-by-two-expressions/m-p/804822#M535428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-08T05:47:47Z</dc:date>
    </item>
  </channel>
</rss>

