<?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: Not able to sort correctly a top 10 in a bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271910#M579985</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 understood the problem. when you use expression like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;=IF(&lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue) &amp;gt; 200,&lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;that means when &lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue) &amp;lt;= 200 the expression returns Null, so the chart does not know how to deal with it correctly. You can try to force the chart to ignore it by checking "Suppress when value is Null" but the chart will continue to see it as values that belong to Others, and you can not sort the chart in ascending manner correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;The solution i found was to use a Calculated Dimension where i use the condition:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;=If( Aggr(sum(revenue), &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Customer&lt;/SPAN&gt;)&amp;gt;200 ,Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;So It is forced that only the customers that have revenue above &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;200$ to be included in the dimension. Then I check "Suppress When Value Is Null".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;In the Expresions Tab there is &lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;and eventually in the Demension Limits Tab I choose "Show Only the Smallest 10 Values".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Thats All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Have a Great Week!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Jan 2012 14:32:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-15T14:32:05Z</dc:date>
    <item>
      <title>Not able to sort correctly a top 10 in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271906#M579981</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 try to show 10 customers that are sorted by their revenue in ascending order, but only to customers that their revenue was more then 200$. &lt;/P&gt;&lt;P&gt;(so, in other words, I want to show my customers with the lowest revenue, but only to those that their minimum revenue is more then 200$) , &lt;/P&gt;&lt;P&gt;so i use this expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF( Sum(revenue) &amp;gt;= 200, Sum(revenue), Null())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then i sort by setting the Y-Value to Ascending, and in the Dimension Limit tab i choose to show only the smallest 10 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what i get is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿﻿﻿&lt;IMG alt="Bar Chart.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/10290_Bar+Chart.png" width="450" /&gt;﻿﻿&lt;/P&gt;&lt;P&gt;all the 9 left empty bars were not supposed to be there, only the right bar stands for the criteria of revenue more than 200$.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to do this correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Guy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 17:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271906#M579981</guid>
      <dc:creator />
      <dc:date>2012-01-12T17:13:04Z</dc:date>
    </item>
    <item>
      <title>Not able to sort correctly a top 10 in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271907#M579982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the Suppress when Value is Null check box checked for your dimension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 17:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271907#M579982</guid>
      <dc:creator />
      <dc:date>2012-01-12T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sort correctly a top 10 in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271908#M579983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;In presentation sheet select 10 for Max Visible Number&lt;/P&gt;&lt;P&gt;For the expresion : in expressions sheet : if (Amount&amp;gt;200,Amount)&lt;/P&gt;&lt;P&gt;In sort sheet&amp;nbsp; Sort by Y-value Ascending &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See in the example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 17:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271908#M579983</guid>
      <dc:creator />
      <dc:date>2012-01-12T17:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sort correctly a top 10 in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271909#M579984</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;Thanks, Its true. But i see now that i uses the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(&lt;STRONG&gt;Sum&lt;/STRONG&gt;(revenue) &amp;gt; 200,&lt;STRONG&gt;Sum&lt;/STRONG&gt;(revenue))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;becuase i want only the customers that their sum is more the 200$ to be included in the chart. &lt;/P&gt;&lt;P&gt;But this causes to the Others to be added to the chart, so what i see eventually is onlt the Others dimention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong with this expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Guy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jan 2012 10:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271909#M579984</guid>
      <dc:creator />
      <dc:date>2012-01-15T10:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sort correctly a top 10 in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271910#M579985</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 understood the problem. when you use expression like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;=IF(&lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue) &amp;gt; 200,&lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;that means when &lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue) &amp;lt;= 200 the expression returns Null, so the chart does not know how to deal with it correctly. You can try to force the chart to ignore it by checking "Suppress when value is Null" but the chart will continue to see it as values that belong to Others, and you can not sort the chart in ascending manner correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;The solution i found was to use a Calculated Dimension where i use the condition:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;=If( Aggr(sum(revenue), &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Customer&lt;/SPAN&gt;)&amp;gt;200 ,Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;So It is forced that only the customers that have revenue above &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;200$ to be included in the dimension. Then I check "Suppress When Value Is Null".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;In the Expresions Tab there is &lt;/SPAN&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum&lt;/STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;(revenue).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;and eventually in the Demension Limits Tab I choose "Show Only the Smallest 10 Values".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Thats All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Have a Great Week!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jan 2012 14:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-able-to-sort-correctly-a-top-10-in-a-bar-chart/m-p/271910#M579985</guid>
      <dc:creator />
      <dc:date>2012-01-15T14:32:05Z</dc:date>
    </item>
  </channel>
</rss>

